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)