[xiph-commits] r10005 - icecast/trunk/icecast/src

karl at svn.xiph.org karl at svn.xiph.org
Thu Sep 8 06:43:36 PDT 2005


Author: karl
Date: 2005-09-08 06:43:33 -0700 (Thu, 08 Sep 2005)
New Revision: 10005

Modified:
   icecast/trunk/icecast/src/fserve.c
Log:
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.


Modified: icecast/trunk/icecast/src/fserve.c
===================================================================
--- icecast/trunk/icecast/src/fserve.c	2005-09-08 13:32:17 UTC (rev 10004)
+++ icecast/trunk/icecast/src/fserve.c	2005-09-08 13:43:33 UTC (rev 10005)
@@ -406,6 +406,13 @@
         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)



More information about the commits mailing list