Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
"=" in query parameter values #1120
Comments
|
Thanks, @jacktol. I think this has been discussed a few times but cannot find a good reference right now. You are right that according to RFC 3986, '=' would be valid everywhere. However, RFC 3986 does not define the semantics of the query string so other specs (like W3C Html specs) could still be stricter than what RFC 3986 allows. The basic question is how to tell apart if the second '=' should be part of the name or of the value of the parameter. If there's no unambiguous spec we usually punt and take the stricter approach. The best document that would give an unambiguous meaning of multiple '=' in a parameter is the one at https://url.spec.whatwg.org/#urlencoded-parsing:
So, I guess at least in relaxed mode we could go with that definition. |
jacktol
commented
May 15, 2017
|
Thanks for the quick response @jrudolph. What you're suggesting sounds reasonable. It seems like a logical way to interpret such values. |
jrudolph
added 1 - triaged community t:core t:model
labels
Jun 7, 2017
jrudolph
referenced
this issue
in playframework/playframework
Jun 9, 2017
Closed
Akka Http Server needs to handle bad paths with status 400 and not 500 #7359
|
The other problem here is error handling. |
|
@jrudolph I agree with your proposal to use the whatwg standard for |
|
@gmethvin |
gmethvin
added a commit
to gmethvin/akka-http
that referenced
this issue
Jun 12, 2017
|
|
gmethvin |
e807a17
|
gmethvin
added a commit
to gmethvin/akka-http
that referenced
this issue
Jun 12, 2017
|
|
gmethvin |
87ac123
|
gmethvin
added a commit
to gmethvin/akka-http
that referenced
this issue
Jun 12, 2017
|
|
gmethvin |
044b331
|
gmethvin
referenced
this issue
Jun 12, 2017
Merged
Allow '=' in query param values in relaxed mode (Fix #1120) #1190
gmethvin
added a commit
to gmethvin/akka-http
that referenced
this issue
Jun 12, 2017
|
|
gmethvin |
b629090
|
gmethvin
added a commit
to gmethvin/akka-http
that referenced
this issue
Jun 13, 2017
|
|
gmethvin |
1834db4
|
gmethvin
added a commit
to gmethvin/akka-http
that referenced
this issue
Jun 14, 2017
|
|
gmethvin |
2b6931b
|
jrudolph
closed this
in #1190
Jun 14, 2017
jrudolph
added a commit
that referenced
this issue
Jun 14, 2017
|
|
gmethvin + jrudolph |
82ac13a
|
jacktol commentedMay 12, 2017
When a query parameter value contains a "=", akka-http throws the following exception:
It doesn't matter whether you're in strict or relaxed mode, the equals sign is not allowed.
When looking at RFC3986 page 23 however, query is defined as:
Where
pcharis defined as:And its types as:
According to this definition the equals sign should be allowed. Am I missing something, or is this a bug in akka-http?
True, I wouldn't use "=" in values myself, but Angular2 for example doesn't escape it as well, hence requiring custom work otherwise.