Commit 32d2dd2e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Specify port in Host: HTTP request header

(thanks to Olivier Lourdais for the report)
parent b95a3b3a
......@@ -607,10 +607,20 @@ static int Connect( access_t *p_access, int64_t i_tell )
{
psz_path = "/";
}
if( p_sys->url.i_port != 80)
{
net_Printf( VLC_OBJECT(p_access), p_sys->fd,
"GET %s HTTP/1.%d\r\nHost: %s:%d\r\n",
psz_path, p_sys->i_version, p_sys->url.psz_host,
p_sys->url.i_port );
}
else
{
net_Printf( VLC_OBJECT(p_access), p_sys->fd,
"GET %s HTTP/1.%d\r\nHost: %s\r\n",
psz_path, p_sys->i_version, p_sys->url.psz_host );
}
}
/* User Agent */
net_Printf( VLC_OBJECT(p_access), p_sys->fd, "User-Agent: %s\r\n",
p_sys->psz_user_agent );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment