Subject: Trailers and intermediaries

From: Mark Nottingham <[email-masked]>
Date: Mon, 13 Aug 2007 20:00:49 +1000

Regarding trailers, section 3.6.1 says:

> The trailer allows the sender to include additional HTTP header  
> fields at the end of the message. The Trailer header field can be  
> used to indicate which header fields are included in a trailer (see  
> section 14.40).
>
> A server using chunked transfer-coding in a response MUST NOT use  
> the trailer for any header fields unless at least one of the  
> following is true:
>
> a) the request included a TE header field that indicates "trailers"  
> is acceptable in the transfer-coding of the response, as described  
> in section 14.39; or,
>
> b) the server is the origin server for the response, the trailer  
> fields consist entirely of optional metadata, and the recipient  
> could use the message (in a manner acceptable to the origin server)  
> without receiving this metadata. In other words, the origin server  
> is willing to accept the possibility that the trailer fields might  
> be silently discarded along the path to the client.
>
Read strictly, this doesn't seem to give an intermediary along the  
path to the client the wiggle room necessary to preserve those  
trailers if the request doesn't have a TE: trailers. Something like  
this might help;

c) the server is an intermediary, the forwarded request did not  
include a TE header field that indicated "trailers", and the trailers  
are being forwarded.

--
Mark Nottingham       [email-masked]

---

From: Henrik Nordstrom <[email-masked]>
Date: Mon, 13 Aug 2007 17:37:10 +0200

> include a TE header field that indicated "trailers", and the trailers  

Personally I don't get why there need to be a distinction between origin
and intermediary here. Informational headers may be added at any step in
the forwarding chain, not just the origin server.

So I propose instead removing the first part of b "the server is the
origin server for the response, ". and also remove "origin " where it
occurs in 'b'.

b) the trailer fields consist entirely of optional metadata, and the
recipient could use the message (in a manner acceptable to the server)
without receiving this metadata. In other words, the server is willing
to accept the possibility that the trailer fields might be silently
discarded along the path to the client.

And for clarity add the obvious restriction that

A proxy server MUST NOT move any existing entity headers to the trailer
unless 'a' is fulfilled.

Regards
Henrik