Re: Cache control in trailers?

On Mon, 8 Feb 2021 at 13:44, Willy Tarreau <w@1wt.eu> wrote:

> Maybe we need to implement something between TE and Trailers so that
> the client could suggest the server to place certain fields in the
> trailer part.
>

I think this is the crux of the matter. Servers can already put pretty
arbitrary fields into trailers if the client says
  TE: trailers

But that is too coarse a switch, because the server cannot know which
particular fields the client is able to handle in the trailers.  It may be
expecting only a check-sum or similar in the trailer, so if the server
starts sending Cache-Control and/or End-Status fields, then it has no way
to know if the client will actually interpret them.

Perhaps we need to send requests something like

  Accept-Trailer: Cache-Control
  TE: trailers
  Connection: TE, Accept-Trailer

If an intermediary is happy to buffer the entire content before acting,
then it can send requests like:

  Accept-Trailer: *
  TE: trailers
  Connection: TE, Accept-Trailer

Servers that send trailer fields that are not listed in an Accept-Trailer
should only consider them advisory and cannot assume that the client will
actually interpret them... which is kind of the state today anyway.

cheers




-- 
Greg Wilkins <gregw@webtide.com> CTO http://webtide.com

Received on Monday, 8 February 2021 15:01:27 UTC