Commit 64d2fc1f authored by Karl Heyes's avatar Karl Heyes

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
parent 7cad0b70
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment