Commit 86e662cf authored by dionoea's avatar dionoea

* modules/access/http.c: When redirecting, don't include port number in URL if...

* modules/access/http.c: When redirecting, don't include port number in URL if it's using the default port.
parent dc3da6a2
......@@ -1086,8 +1086,16 @@ static int Request( access_t *p_access, int64_t i_tell )
{
const char *psz_http_ext = p_sys->b_ssl ? "s" : "" ;
asprintf(&psz_new_loc, "http%s://%s:%d%s", psz_http_ext,
p_sys->url.psz_host, p_sys->url.i_port, p);
if( p_sys->url.i_port == ( p_sys->b_ssl ? 443 : 80 ) )
{
asprintf(&psz_new_loc, "http%s://%s%s", psz_http_ext,
p_sys->url.psz_host, p);
}
else
{
asprintf(&psz_new_loc, "http%s://%s:%d%s", psz_http_ext,
p_sys->url.psz_host, p_sys->url.i_port, p);
}
}
else
{
......
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