[PATCH 1 of 3] HTTP: add support for trailers in HTTP responses
piotrsikora at google.com
Sat Jun 3 03:32:26 UTC 2017
> I see two problems here:
> a. There may be use cases when forcing chunked encoding is not
> desired, but emitting trailers if it is used still makes sense.
Like what, exactly?
Also, gzip module forces chunked encoding and it works just fine. I
don't see why are you making this such a big deal out of this.
> b. Nothing stops modules from changing r->expect_trailers when the
> response header was already sent and it is already too late to
> switch to chunked transfer encoding. Moreover, this will
> naturally happen with any module which is simply following the
> requirement to set r->expect_trailers to 1 as in your commit log.
Same is true for majority of ngx_http_request_t fields, i.e. bad
things can happen if some module misuses them.
> So (a) makes (2) excessively limiting, and (b) makes it useless.
I disagree. Removing this check results in less consistent behavior
and doesn't solve any real problems.
Having said that, I'm going to remove it, since I don't want to spend
another few months arguing about this...
More information about the nginx-devel