diff --git a/modules/access/http.c b/modules/access/http.c index d540e62336..ccd416fa77 100644 --- a/modules/access/http.c +++ b/modules/access/http.c @@ -1244,12 +1244,13 @@ static int Request( access_t *p_access, uint64_t i_tell ) const char *psz_path = p_sys->url.psz_path; if( !psz_path || !*psz_path ) psz_path = "/"; - net_Write( p_access, p_sys->fd, pvs, "GET ", 4 ); if( p_sys->b_proxy && pvs == NULL ) - net_Printf( p_access, p_sys->fd, NULL, "http://%s:%d", - p_sys->url.psz_host, p_sys->url.i_port ); - net_Printf( p_access, p_sys->fd, pvs, "%s HTTP/1.%d\r\n", - psz_path, p_sys->i_version ); + net_Printf( p_access, p_sys->fd, NULL, + "GET http://%s:%d HTTP/1.%d\r\n", + p_sys->url.psz_host, p_sys->url.i_port, p_sys->i_version ); + else + net_Printf( p_access, p_sys->fd, pvs, "GET %s HTTP/1.%d\r\n", + psz_path, p_sys->i_version ); if( p_sys->url.i_port != (pvs ? 443 : 80) ) net_Printf( p_access, p_sys->fd, pvs, "Host: %s:%d\r\n", p_sys->url.psz_host, p_sys->url.i_port );