[PATCH 1 of 2] HTTP: add support for trailers in HTTP responses

Piotr Sikora piotrsikora at google.com
Wed Jul 13 17:25:57 UTC 2016


Hey Maxim,

> So the question remains: are there any real-world use cases?  May
> be someone will be able to provide some.

It's a chicken-and-egg problem. It's hard to use a feature that's not
supported by one of the most popular web servers.

> Without real-world use cases I don't think this should be added,
> as in general trailers is quite external concept to how nginx
> works and also may have various security implications.

Just to be clear, are you talking about HTTP/1.1 trailers or trailers
in general? The patch also includes HTTP/2 trailers and it's not clear
which one you don't like.

> Silently dropping trailers is what anyway happens if the client
> doesn't support chunked encoding at all (e.g., uses HTTP/1.0).
> And this is also what happens in your patch if there is no "TE:
> trailers".

Yes, but then it happens for a reason (client doesn't support
trailers) and not "just because".

> I think that whether to drop Content-Length and switch to chunked
> encoding is highly use-case specific question.  In some cases it
> may be appropriate, in some cases not, and in some cases one may
> want to add trailers even without "TE: trailers".  So forcing
> chunked encoding probably should be configured separately.  On the
> other hand, it's very hard to decide something given there are no
> real use cases known.

Why? I don't see anyone making a big deal out of forced chunked
encoding with "gzip on".

Best regards,
Piotr Sikora



More information about the nginx-devel mailing list