[vlc-commits] http: tighten redirection to the MMS module (fixes #19657)

2018-02-11 Thread Rémi Denis-Courmont
vlc/vlc-3.0 | branch: master | Rémi Denis-Courmont  | 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 

> 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(, "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


[vlc-commits] http: tighten redirection to the MMS module (fixes #19657)

2018-02-11 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | 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(, "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