mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
if the m3u link is placed in winamp/fb2k, then the host header misses the
port number, so I'll add a check that ignores the host header if it's missing a port and generates the m3u host:port from the xml. svn path=/icecast/trunk/icecast/; revision=10005
This commit is contained in:
parent
7cad0b70d6
commit
64d2fc1faa
@ -406,6 +406,13 @@ int fserve_client_create (client_t *httpclient, const char *path)
|
||||
char *host = httpp_getvar (httpclient->parser, "host");
|
||||
char *sourceuri = strdup (path);
|
||||
char *dot = strrchr(sourceuri, '.');
|
||||
|
||||
/* at least a couple of players (fb2k/winamp) are reported to send a
|
||||
* host header but without the port number. So if we are missing the
|
||||
* port then lets treat it as if no host line was sent */
|
||||
if (host && strchr (host, ':') == NULL)
|
||||
host = NULL;
|
||||
|
||||
*dot = 0;
|
||||
httpclient->respcode = 200;
|
||||
if (host == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user