vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Tue Mar 1 07:37:30 2016 +0200| [3425a6c2f6b38c6fbfca9c936410dfd5c2215ede] | committer: Rémi Denis-Courmont
http: redirect to icyx:// if Icy-Name or Icy-Genre present If an ICY server returns an HTTP response (instead of an non-HTTP ICY response), rewrite the URL to use icyx:// explicitly. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3425a6c2f6b38c6fbfca9c936410dfd5c2215ede --- modules/access/http/resource.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/access/http/resource.c b/modules/access/http/resource.c index 7047d2b..34f0cc9 100644 --- a/modules/access/http/resource.c +++ b/modules/access/http/resource.c @@ -217,6 +217,12 @@ char *vlc_http_res_get_redirect(const struct vlc_http_resource *restrict res, if (vlc_http_msg_get_token(resp, "Pragma", "features") != NULL && asprintf(&url, "mmsh://%s%s", res->authority, res->path) >= 0) return url; + + /* HACK: Seems like an ICY server. Redirect to ICYX scheme. */ + if ((vlc_http_msg_get_header(resp, "Icy-Name") != NULL + || vlc_http_msg_get_header(resp, "Icy-Genre") != NULL) + && asprintf(&url, "icyx://%s%s", res->authority, res->path) >= 0) + return url; } /* TODO: if (status == 426 Upgrade Required) */ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
