[MERGE] Don't require Content-Type

Robert Collins robertc at robertcollins.net
Mon Oct 16 07:19:28 BST 2006


On Fri, 2006-10-13 at 08:54 -0400, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ben Finney wrote:
> > Robert Collins <robertc at robertcollins.net> writes:
> > (a response has *one* header and *one* body. the header contains
> > fields. yes, this is a pet peeve, how did you guess? :-)
> 
> Even the RFC recognises that "headers" is a common term for "header
> fields".  I think you'd do well to get over this.

RFC2616 section 4.2:
message-header = field-name ":" [ field-value ]

Thats in the BNF for HTTP. So 'message-header' is entirely accurate as
the name for a single header. As is 'header field', field, etc.

As Aaron says the RFC also offers an abbreviation for header fields:
Section 4.1:
...Both types of message consist of a start-line, zero
   or more header fields (also known as "headers"), an empty line (i.e.,
   a line with nothing preceding the CRLF) indicating the end of the
   header fields, and possibly a message-body.

So pet peeve or not, header fields are formally known as 'headers'
according to the standard. Further, messages do /not/ have a single
'header' and 'body' - messages have zero to many headers, and an
optional message body. The BNF makes this quite clear, as it does not
define a 'header' in the grammar, rather a list of headers:
        generic-message = start-line
                          *(message-header CRLF)
                          CRLF
                          [ message-body ]
        start-line      = Request-Line | Status-Line

Cheers,
Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061016/dc2e7308/attachment.pgp 


More information about the bazaar mailing list