Subject: #496, was: p6: Warning header field

From: Julian Reschke <[email-masked]>
Date: Mon, 23 Sep 2013 15:02:55 +0200

On 2013-06-09 09:22, Roy T. Fielding wrote:
> I just noticed that the definition of the Warning header field
> includes a required host or pseudonym between the warn-code and
> the warn-text, and further that the warn-text is a quoted-string.
>
> Since there are no examples provided, and the table of warn-codes
> makes them look like status-code reason-phrase, it should be no
> surprise that implementations send things like
>
>    Warning: 110 Response is stale
>    Warning: 110 squid/3.2.0.5 "Response is stale"
>    Warning: 111 squid/3.2.0.5 "Revalidation failed"
>    Warning: 111 Revalidation failed
>    Warning: 112 Disconnected Operation
>    Warning: 214 host.example.com Transformation applied
>
> In fact, the only places I can find correctly formatted Warning
> header fields is in an internal Apache debugging module (mod_policy,
> abusing that field for other means) and within a BEA example for SIP.
>
>    Warning: 307 isi.edu "Session parameter 'foo' not understood"
>
> I haven't found any that send the optional warn-date.
>
> Obviously, examples are needed in p6, unless I can delete the
> header field and be done with it.

I agree we need examples; I'll work on a proposal (ticket: 
http://trac.tools.ietf.org/wg/httpbis/trac/ticket/496)

Best regards, Julian

---

From: Julian Reschke <[email-masked]>
Date: Mon, 23 Sep 2013 16:23:49 +0200

On 2013-09-23 15:02, Julian Reschke wrote:
> ...
> ...

Proposal 
(<http://trac.tools.ietf.org/wg/httpbis/trac/attachment/ticket/496/496.diff>):

5.5.8.  Examples

    A response message carrying a warning that indicates that the payload
    has been re-encoded (note the use of escaping in the quoted-string
    syntax):

      HTTP/1.1 200 OK
      Date: Sat, 25 Aug 2012 23:34:45 GMT
      Warning: 214 example.org "charset changed to \"iso-8859-1\""
       "Sat, 25 Aug 2012 23:34:45 GMT"
      Content-Type: text/plain; charset=iso-8859-1

    In the example below, the first warning-value carries a warn-date not
    matching the Date header field's value, and thus would be removed/
    ignored by the recipient:

      HTTP/1.1 200 OK
      Date: Sun, 26 Aug 2012 01:12:34 GMT
      Warning: 214 example.org "charset changed to \"iso-8859-1\""
       "Sat, 25 Aug 2012 23:34:45 GMT",
       214 example.org "charset changed to \"utf-8\""
       "Sun, 26 Aug 2012 01:12:34 GMT"
      Content-Type: text/plain; charset=utf-8

    In the examples above, line breaks (OWS) have been inserted into
    field values for readability (but see Section 3.2.4 of [Part1]).

Best regards, Julian

---

From: "Roy T. Fielding" <[email-masked]>
Date: Mon, 23 Sep 2013 18:19:32 -0700

I already added examples by turning the section headers into valid field values.  I added just one more (simple) example with a warn-date.

....Roy