vlc | branch: master | Rémi Denis-Courmont <r...@remlab.net> | Sun Feb 11 
11:13:22 2018 +0200| [ce921f1e3c3cc42ba6292443d2b44e80efcf5eb4] | 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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ce921f1e3c3cc42ba6292443d2b44e80efcf5eb4
---

 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;
 

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to