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,9 +607,19 @@ static int Connect( access_t *p_access, int64_t i_tell ) ...@@ -607,9 +607,19 @@ static int Connect( access_t *p_access, int64_t i_tell )
{ {
psz_path = "/"; psz_path = "/";
} }
net_Printf( VLC_OBJECT(p_access), p_sys->fd, if( p_sys->url.i_port != 80)
"GET %s HTTP/1.%d\r\nHost: %s\r\n", {
psz_path, p_sys->i_version, p_sys->url.psz_host ); 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 */ /* User Agent */
net_Printf( VLC_OBJECT(p_access), p_sys->fd, "User-Agent: %s\r\n", net_Printf( VLC_OBJECT(p_access), p_sys->fd, "User-Agent: %s\r\n",
......
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