[vlc-devel] [PATCH] LUA: Remove protocol from vlc.path after redirect
Rémi Denis-Courmont
remi at remlab.net
Fri Jan 6 09:44:10 CET 2012
Le vendredi 6 janvier 2012 01:38:20 Gaurav Narula, vous avez écrit :
> ---
> 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 );
This won't work if the redirection alternates between secure and non-secure
modes or vice versa.
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
More information about the vlc-devel
mailing list