HTTP URL - 参数名称中允许的字符 [英] HTTP URL - allowed characters in parameter names

查看:345
本文介绍了HTTP URL - 参数名称中允许的字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于URL参数名称中允许哪些字符有正式限制吗?

Is there any formal restriction as to which characters are allowed in URL parameter names?

我一直在阅读 RFC3986 (统一资源标识符(URI):通用语法),但没有得出明确的结论。

I've been reading RFC3986 ("Uniform Resource Identifier (URI): Generic Syntax") but came to no definitive conclusion.

我知道有实际的限制,但它实际上是被禁止做类似如下:

I know there are practical limitations, but would it actually be forbidden to do something like:

param with\funny<chars>=some_value

param%20with%1cfunny%3cchars%3e=some_value


推荐答案

URI规范中转义的参数名称没有限制。但是,您使用的服务器端软件可能存在限制。如果你使用自制脚本来解释URI,这是尤其真实的。

There are no restrictions on escaped parameter names in the URI specs. There might be restrictions in the server-side software that you use, though. This is especially true if you use "homemade" scripts to interpret URIs.

这篇关于HTTP URL - 参数名称中允许的字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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