From 64d2fc1faa46cf98b0576521c4975d3ae43ff252 Mon Sep 17 00:00:00 2001 From: Karl Heyes Date: Thu, 8 Sep 2005 13:43:33 +0000 Subject: [PATCH] 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 --- src/fserve.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/fserve.c b/src/fserve.c index 0a9fa22e..c80c0728 100644 --- a/src/fserve.c +++ b/src/fserve.c @@ -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)