net/url: Parsing of URL with a query string containing multiple question marks ?
is invalid
#18405
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?https://play.golang.org
and
What operating system and processor architecture are you using (
go env
)?What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
I am trying to parse a URL with a query string containing multiple question marks (
?
):?a=1?b=2?c=3
.See the full example here: https://play.golang.org/p/LNpa_F9kuh
What did you expect to see?
I would expect the query string
?a=1?b=2?c=3
to be parsed the same way that?a=1&b=2&c=3
is parsed; that is I expect to get a mapping with 3 entries:a
mapped to1
,b
mapped to2
andc
mapped to3
.What did you see instead?
what I get is a map with a single entry:
a
mapped to1?b=2?c=3
.The text was updated successfully, but these errors were encountered: