diff -ru cups-1.4.7/cups/http-support.c cups-1.4.7.uriportfix/cups/http-support.c
--- cups-1.4.7/cups/http-support.c      2010-10-02 00:40:38.000000000 +0200
+++ cups-1.4.7.uriportfix/cups/http-support.c   2011-06-30 10:09:35.000000000 +0200
@@ -1100,7 +1100,7 @@

       *port = strtol(uri + 1, (char **)&uri, 10);

-      if (*uri != '/' && *uri)
+      if (*uri != '/' && *uri != '?' && *uri)
       {
         *port = 0;
         return (HTTP_URI_BAD_PORT);