W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2010

Re: suggestions for examples and explication wrt ABNF and header fields in draft-ietf-httpbis-p1

From: Julian Reschke <julian.reschke@gmx.de>
Date: Wed, 13 Jan 2010 18:36:58 +0100
Message-ID: <4B4E04BA.3030404@gmx.de>
To: =JeffH <Jeff.Hodges@KingsMountain.com>
CC: IETF HTTP WG <ietf-http-wg@w3.org>
=JeffH wrote:
> ...
> WRT "3.2    Header Fields"..
> 
>  > 3.2.  Header Fields
>  >
>  >    Each HTTP header field consists of a case-insensitive field name
>  >    followed by a colon (":"), optional whitespace, and the field value.
>  >
>  >      header-field   = field-name ":" OWS [ field-value ] OWS
>  >      field-name     = token
>  >      field-value    = *( field-content / OWS )
>  >      field-content  = *( WSP / VCHAR / obs-text )
>  >
>  >    No whitespace is allowed between the header field name and colon.
>  >    For security reasons, any request message received containing such
>  >    whitespace MUST be rejected with a response code of 400 (Bad
>  >    Request).  A proxy MUST remove any such whitespace from a response
>  >    message before forwarding the message downstream.
>  >
>  >    A field value MAY be preceded by optional whitespace (OWS); a single
>  >    SP is preferred.  The field value does not include any leading or
>  >    trailing white space: OWS occurring before the first non-whitespace
>  >    character of the field value or after the last non-whitespace
>  >    character of the field value is ignored and SHOULD be removed without
>  >    changing the meaning of the header field.
> 
> 
> I suggest adding, right here after the above paragraph, some example 
> header fields. At least one should feature comma-separated field-values. 
> e.g.
> 
> 
>      example-header1: foo
> 
>      example-header2:foo
> 
>      example-header3: foo=bar,barfoo;attrib,charlie
> 
>      etc.
> ...

I agree that we currently have too few examples. On the other hand, I'd 
prefer only to add examples if it's clear that they're useful.

I don't think there's any confusion about how header fields look in 
practice, so these totally generic examples don't look too useful to me.

As you mentioned comma-separated values... Did you think about the case 
of list productions, and the way headers using them can be recombined? 
That would probably be a good example to have. Such as:

  example: foo
  example: bar

is equivalent to:

  example: foo, bar

Feedback appreciated, Julian
Received on Wednesday, 13 January 2010 17:37:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:51:16 GMT