在查询参数中的第一个等号后,是否可以出现等号? [英] Can an equals sign appear after the first equals sign in a query parameter?

查看:115
本文介绍了在查询参数中的第一个等号后,是否可以出现等号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,这是一个有效的网址:

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:


  • 谷歌浏览器

  • Firefox

  • NodeJS' decodeURIComponent

  • Google Chrome
  • Firefox
  • NodeJS' decodeURIComponent

推荐答案

key = value 查询组件中的格式只是一种约定

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.

所以是的,它是一个有效的URI。

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.

这篇关于在查询参数中的第一个等号后,是否可以出现等号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆