Commit 86e662cf authored by Antoine Cellerier's avatar Antoine Cellerier

* 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,9 +1086,17 @@ static int Request( access_t *p_access, int64_t i_tell )
{
const char *psz_http_ext = p_sys->b_ssl ? "s" : "" ;
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
{
psz_new_loc = strdup( p );
......
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