Commit e1adaf19 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

http: try to handle invalid redirections (refs #17161)

parent 132aa931
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment