httphttp-headershttp-accept-encoding

Is it valid to leave Accept-Encoding field empty?


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

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

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

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

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?


Solution

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

    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.