Unknown and misplaced headers as entity headers

The specification repeatedly says that "unrecognized header fields are treated as
entity-header fields": [Part 1, section 4.5], [Part 2, section 4], [Part 2, section 6], [Part 3, section 4.1]. However, it also says that unrecognized header fields MAY be treated as response and/or request headers. 

The BNF for extension-header is "extension-header = message-header".

Here are several issues:

* In practice, applications cannot usefully classify an unrecognized header, and they definitely do not treat them as entity headers. Declaring them to be entity headers adds confusion with no benefit.

* The BNF for extension-header matches all other header types. That means that when a client includes a response-header in a request, or a server includes a request-header in a response, the header is to be treated as an entity header. That doesn't make any sense. 

PROPOSAL:

* Remove the statements that say that unrecognized header fields are treated as entity-header fields.

* Move the extension-header definition to Part 1, and replace the ABNF for Request, Response, and trailer-part:

  Request       = Request-Line            ; Section 5.1
                  *(( general-header      ; Section 4.5
                    | request-header      ; [Part2], Section 4
                    | entity-header       ; [Part3], Section 4.1
                    | extension-header) CRLF)
                  CRLF
                  [ message-body ]        ; Section 4.3

  Response      = Status-Line             ; Section 6.1
                *(( general-header        ; Section 4.5
                  | response-header       ; [Part2], Section 6
                  | entity-header         ; [Part3], Section 4.1
   | extension-header) CRLF)  
                 CRLF
                 [ message-body ]         ; Section 4.3

  trailer-part   = *((entity-header
                     |extension-header CRLF))
    

As I mentioned before, I would also like to see some way of using the Accept-* headers in a "415 Unsupported Media Type" response, so that the server can indicate which media types, languages, encodings, etc. it would be willing to accept. After reviewing the charter, it seems like this would be out of scope for httpbis. If so, httpbis should at least leave the door open for it (that is, do not preclude the use of request-headers as response-headers).

- Brian

Received on Wednesday, 27 February 2008 01:49:35 UTC