According to RFC3986 (URI),
The query component is indicated by the first question
mark ("?") character and terminated by a number sign ("#") character
or by the end of the URI.
And specifies what characters are allowed inside. That's generic URI.
In daily interaction with various HTTP/Web servers, in URI http
scheme, we're seeing query components represented as key=value
pairs separated by &
sign. RFC7230 (HTTP/1.1) says nothing about it, just that the content of the query component corresponds to RFC3986 generic definition.
The only standard defining said key-value pairs is HTML 4.01 while talking about content type application/x-www-form-urlencoded
. It's also the only standard saying +
should be treated as Space character in the query component.
However, as far as I could dig up in the specs, Content-Type
header only applies to the message body, not its URI. And when, as an experiment, I'm googling for "asd zxc" Chrome sends the request /search?q=zxc+asd
to Google without specifying said application/x-www-form-urlencoded
content type at all.
Is it just conventional or am I missing something?