[vlc-commits] http: try to handle invalid redirections (refs #17161)
Rémi Denis-Courmont
git at videolan.org
Tue Jul 12 22:22:37 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jul 12 23:19:36 2016 +0300| [e1adaf19e481edd743d4e542ba0a06233351cab4] | committer: Rémi Denis-Courmont
http: try to handle invalid redirections (refs #17161)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e1adaf19e481edd743d4e542ba0a06233351cab4
---
modules/access/http/access.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/modules/access/http/access.c b/modules/access/http/access.c
index a4090f0..efb1954 100644
--- a/modules/access/http/access.c
+++ b/modules/access/http/access.c
@@ -31,6 +31,7 @@
#include <vlc_access.h>
#include <vlc_plugin.h>
#include <vlc_network.h> /* FIXME: only for vlc_getProxyUrl() */
+#include <vlc_url.h>
#include "connmgr.h"
#include "resource.h"
@@ -205,6 +206,12 @@ static int Open(vlc_object_t *obj)
char *redir = vlc_http_res_get_redirect(sys->resource);
if (redir != NULL)
{
+ char *fixed = vlc_uri_fixup(redir);
+ if (likely(fixed != NULL))
+ {
+ free(redir);
+ redir = fixed;
+ }
access->psz_url = redir;
ret = VLC_ACCESS_REDIRECT;
goto error;
More information about the vlc-commits
mailing list