问题
For example, is this a valid URL:
http://0.0.0.0:8080/auth/reset?id=AAAAAAAAAAA=&code=uX8kklWhVi-Vhp4BdMRQYBEveEdwQXBFDecLlsT6yBw=
From what I've researched it seems to be discouraged (but I haven't found anything definitive), but all the decoders I've tested it with decode it correctly. This includes:
- Google Chrome
- Firefox
- NodeJS'
decodeURIComponent
回答1:
The key=value format in the query component is just a convention.
The = is allowed in the query component, and it has no reserved meaning there.
So yes, it is a valid URI.
How the parameters get parsed depends on the specific implementation. As the parameters are typically separated by a &, it would make sense to interpret additional = characters as part of the value.
来源:https://stackoverflow.com/questions/42506034/can-an-equals-sign-appear-after-the-first-equals-sign-in-a-query-parameter