HTTP 标头可以本地化吗?
HTTP Accept 标头可以使用 q
说明符指定优先级,例如
application/xml;q=0.8
我查看了 RFC,但可以看到任何提及 q
说明符是否受本地化或不是。例如,如果相应设置了 Accept-Language
,欧洲浏览器是否可以将数字发送为 q=0,8
?
如果没有,一定有一些文档指定 HTTP 使用句点符号,并且我猜其标头中的文化不变?
The HTTP Accept header can specify priority using the q
specifier, such as
application/xml;q=0.8
I had a look in the RFC but could see any mention of whether the q
specifier is subject to localization or not. For instance, could a European browser send the figure as q=0,8
instead if the Accept-Language
was set accordingly?
If not, there must be some documentation somewhere that specifies that HTTP uses the period notation and is culture invariant in its headers I guess?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
第 3.9 节 /www.w3.org/Protocols/rfc2616/rfc2616.html" rel="nofollow">RFC-2616 (HTTP/1.1 规范)将质量值(在示例中分配给“q”的值)定义为:
因此所有 HTTP 应用程序都必须使用小数点,而不是逗号或其他任何内容,无论它们位于世界何处。
Section 3.9 of RFC-2616 (the HTTP/1.1 spec) defines a Quality Value (the value assigned to 'q' in your example) as:
so all HTTP applications must use a decimal point, not a comma or anything else, regardless of where in the world they reside.
技术协议总是与文化无关的——它是技术性的,而不是美国的或其他什么的。当然,您无法本地化 HTTP 标头中的任何内容。您也不能通过将标头字段翻译为运行或编写浏览器的国家/地区使用的语言来本地化标头字段。
A technical protocol is always culture-independent - it's technical, not American or anything. Of course you can not localize anything in a HTTP header. You can also not localize the header fields by translating them to the language that it is used in the country the browser is run or written in.