In shord: How is in a HTTP1.1 standard conformant way to rfc2616 a GET query to an URL like http://example.com/?query
Wikipedia says
GET /?query HTTP/1.1
...
In the rfc2616 it says
Request-URI = "*" | absoluteURI | abs_path | authority
Only abs_path and absoluteURI are relevant for GET requests.
where abs_path is actually from the uri rfc which forbids a "?", since the abs_path is actually the part of the uri which comes before the query part. So it seems the variant from wikipedia is syntacticly incorrect.
For this the uri rfc says
absoluteURI = scheme ":" ( hier_part | opaque_part )
hier_part = ( net_path | abs_path ) [ "?" query ]
So it is possible to put such a query into the Request-URI, but unfortunetly the rfc2616 dissallows the transmission of absoluteURI for client not speaking with a proxy. It is possible to receive this in a standard compliant way by a webserver, but it is actually not possible to send it standard compliently with a browser or some other client.
To my astonishment the rfc2616 mentions a "?" in the rel_path, but neither is this allowed by rfc2396, nor is it actually possible to put a rel_path somewhere into an http request, since the rel_path rule is not syntacticly used anywhere in rfc2616.
So my question is, how to standard compliantly make such an request, and are all the browsers breaking the standard?
That's a bug in RFC 2616. See http://trac.tools.ietf.org/wg/httpbis/trac/ticket/11.