--- cups-1.2.4/scheduler/client.c.str2173-1 2008-04-02 18:28:14.000000000 +0300 +++ cups-1.2.4/scheduler/client.c 2008-04-02 20:03:43.000000000 +0300 @@ -3238,12 +3238,15 @@ */ if ((options = strchr(con->uri, '?')) != NULL) - { options ++; + else + options = con->uri + strlen(con->uri); - if (strchr(options, '=')) - cupsdSetStringf(&(con->query_string), "QUERY_STRING=%s", options); - } + /* + * RFC 2396 [4.1.7] states that QUERY_STRING MUST *always* be set; + * if there's no query component then to an empty string. + */ + cupsdSetStringf(&(con->query_string), "QUERY_STRING=%s", options); /* * Check for known types...