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

http: tighten redirection to the MMS module (fixes #19657)

Match the exact same "logic" as in previous VLC versions, i.e. only
if the Pragma header is exactly equal to "features", rather than
contains the "features" token.

(cherry picked from commit ce921f1e)
Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <remi@remlab.net>
parent 984e50e5
...@@ -256,7 +256,8 @@ char *vlc_http_res_get_redirect(struct vlc_http_resource *restrict res) ...@@ -256,7 +256,8 @@ char *vlc_http_res_get_redirect(struct vlc_http_resource *restrict res)
char *url; char *url;
/* HACK: Seems like an MMS server. Redirect to MMSH scheme. */ /* HACK: Seems like an MMS server. Redirect to MMSH scheme. */
if (vlc_http_msg_get_token(res->response, "Pragma", "features") != NULL const char *pragma = vlc_http_msg_get_header(res->response, "Pragma");
if (pragma != NULL && !vlc_ascii_strcasecmp(pragma, "features")
&& asprintf(&url, "mmsh://%s%s", res->authority, res->path) >= 0) && asprintf(&url, "mmsh://%s%s", res->authority, res->path) >= 0)
return url; return url;
......
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