什么标准指定HTTP URI中查询组件的内部结构

时间:2017-02-09 16:46:34

标签: http uri

根据RFC3986(URI),

The query component is indicated by the first question
mark ("?") character and terminated by a number sign ("#") character
or by the end of the URI.

并指定内部允许的字符。这是一般的URI。

在与各种HTTP / Web服务器的日常交互中,在URI http方案中,我们会看到由key=value符号分隔的&对表示的查询组件。 RFC7230(HTTP / 1.1)对此一无所知,只是查询组件的内容对应于RFC3986通用定义。

在讨论内容类型application/x-www-form-urlencoded时,定义所述键值对的唯一标准是HTML 4.01。它也是+应被视为查询组件中的空格字符的唯一标准。

但是,就我在规范中挖掘而言,Content-Type标头仅适用于邮件正文,而不适用于其URI。而作为一项实验,我正在使用Google搜索" asd zxc" Chrome会将请求/search?q=zxc+asd发送给Google,而不会指定所述application/x-www-form-urlencoded内容类型。

这只是传统还是我遗失了什么?

0 个答案:

没有答案