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

查看:38
本文介绍了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 withfunny<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天全站免登陆