将Accept-Encoding字段留空是否有效? [英] Is it valid to leave Accept-Encoding field empty?

查看:207
本文介绍了将Accept-Encoding字段留空是否有效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现Accept-Encoding的例子违反了文档中的规范:

I found the example of Accept-Encoding violates the specification in the document:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14#sec14.3

Accept-Encoding标题字段定义如下:

The "Accept-Encoding" header field is defined as below:

   Accept-Encoding  = "Accept-Encoding" ":"
                      1#( codings [ ";" "q" "=" qvalue ] )

所以根据 1#(...)的语法,它应该在值列表中至少包含一个元素。但其中一个例子是:

So according to the syntax of 1#(...), it should contain at least one element in the value list. But one of the examples comes after it is:

   Accept-Encoding:

它有一个空值部分。我错过了什么吗?并且有人能告诉我这个用法是否有效?

It has a blank value part. Did I miss anything? And could anyone tell me is this usage valid or not?

推荐答案

你真的应该停止查看RFC 2616.参见 http://trac.tools.ietf.org/wg/httpbis/trac/wiki

You really should stop looking at RFC 2616. See http://trac.tools.ietf.org/wg/httpbis/trac/wiki.

您的问题的答案如下: http://trac.tools.ietf.org/wg/httpbis/trac/ticket/25 ,是的,空字段值有效。

The answer to your question is here: http://trac.tools.ietf.org/wg/httpbis/trac/ticket/25, so yes, an empty field value is valid.

这篇关于将Accept-Encoding字段留空是否有效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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