mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-21 18:26:06 -05:00
[http] Also allow remote playlists to have https streams (fixes #1251)
Fix it by adding net_is_http_or_https() utility function in misc.h and make sure it used whenever a http protocol check is made.
This commit is contained in:
@@ -363,6 +363,11 @@ net_evhttp_bind(struct evhttp *evhttp, short unsigned port, const char *log_serv
|
||||
}
|
||||
*/
|
||||
|
||||
bool
|
||||
net_is_http_or_https(const char *url)
|
||||
{
|
||||
return (strncasecmp(url, "http://", strlen("http://")) == 0 || strncasecmp(url, "https://", strlen("https://")) == 0);
|
||||
}
|
||||
|
||||
/* ----------------------- Conversion/hashing/sanitizers -------------------- */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user