]> git.sesse.net Git - vlc/commitdiff
Fix for requests without path when using proxy
authorClément Stenac <zorglub@videolan.org>
Tue, 8 Jun 2004 09:16:04 +0000 (09:16 +0000)
committerClément Stenac <zorglub@videolan.org>
Tue, 8 Jun 2004 09:16:04 +0000 (09:16 +0000)
modules/access/http.c

index 5191578d78fd92b7900716f8acc25140fb9cf109..500b013ba286419079592b3b3fe3a042eb389035 100644 (file)
@@ -584,10 +584,21 @@ static int Connect( access_t *p_access, int64_t i_tell )
 
     if( p_sys->b_proxy )
     {
-        net_Printf( VLC_OBJECT(p_access), p_sys->fd,
-                    "GET http://%s:%d/%s HTTP/1.%d\r\n",
-                    p_sys->url.psz_host, p_sys->url.i_port,
-                    p_sys->url.psz_path, p_sys->i_version );
+        if( p_sys->url.psz_path )
+        {
+            net_Printf( VLC_OBJECT(p_access), p_sys->fd,
+                        "GET http://%s:%d/%s HTTP/1.%d\r\n",
+                        p_sys->url.psz_host, p_sys->url.i_port,
+                        p_sys->url.psz_path, p_sys->i_version );
+        }
+        else
+        {
+            net_Printf( VLC_OBJECT(p_access), p_sys->fd,
+                        "GET http://%s:%d/ HTTP/1.%d\r\n",
+                        p_sys->url.psz_host, p_sys->url.i_port,
+                        p_sys->i_version );
+
+        }
     }
     else
     {