I know I need to encode the arguments of parameters in a query string of a URI, but what about the parameter names, do they need to be encoded too?
1 Answer
Yes. Special characters in query strings have their special meaning anywhere in the query string.
If the parameter name is foo=bar then ?foo=bar=something won't be parsed as foo=bar equals something.
1 Comment
OfirD
"won't be parsed" - it depends on the parsing implementation, isn't it (hypothetically, a parsing implementation may decide that for each query string parameter all
= except the last one are ignored)? after all, = is allowed unencoded in a query string.