[vlc-devel] [PATCH] LUA: Remove protocol from vlc.path after redirect

Gaurav Narula gnarula94 at gmail.com
Fri Jan 6 00:38:20 CET 2012


---
 modules/access/http.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/access/http.c b/modules/access/http.c
index d32a0a9..deaab84 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -581,7 +581,8 @@ connect:
             goto error;
         }
         free( p_access->psz_location );
-        p_access->psz_location = strdup( p_sys->psz_location );
+        char *slash = strstr(p_sys->psz_location, "://");
+        p_access->psz_location = (slash) ? strdup( slash + 3 ) : p_sys->psz_location;
         /* Clean up current Open() run */
         vlc_UrlClean( &p_sys->url );
         http_auth_Reset( &p_sys->auth );
-- 
1.7.1




More information about the vlc-devel mailing list