[vlc-commits] http: tighten redirection to the MMS module (fixes #19657)
Rémi Denis-Courmont
git at videolan.org
Sun Feb 11 10:22:27 CET 2018
vlc/vlc-3.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb 11 11:13:22 2018 +0200| [ee92844b6310bbce4109cd8251b60a9091a45ceb] | committer: 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 ce921f1e3c3cc42ba6292443d2b44e80efcf5eb4)
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=ee92844b6310bbce4109cd8251b60a9091a45ceb
---
modules/access/http/resource.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/access/http/resource.c b/modules/access/http/resource.c
index 4f49a4bff6..9a28bb50f3 100644
--- a/modules/access/http/resource.c
+++ b/modules/access/http/resource.c
@@ -256,7 +256,8 @@ char *vlc_http_res_get_redirect(struct vlc_http_resource *restrict res)
char *url;
/* 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)
return url;
More information about the vlc-commits
mailing list