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

https: redirect to MMS over HTTP (fixes #16180)

parent 5e020e6d
......@@ -200,6 +200,15 @@ char *vlc_http_res_get_redirect(const struct vlc_http_resource *restrict res,
|| status == 306 /* Switch Proxy (former) */)
return NULL;
if (!res->secure
&& vlc_http_msg_get_token(resp, "Pragma", "features") != NULL)
{ /* HACK: Seems like an MMS server. Redirect to MMSH scheme. */
char *url;
if (asprintf(&url, "mmsh://%s%s", res->authority, res->path) >= 0)
return url;
}
const char *location = vlc_http_msg_get_header(resp, "Location");
if (location == NULL)
return NULL;
......
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