[PATCH] HTTP/2: add fast-path for HTTP/2 requests without request body
piotrsikora at google.com
Thu Mar 30 01:59:32 UTC 2017
> That doesn't look like a correct patch to me as it changes behavior
> of ngx_http_read_client_request_body() specifically for HTTP/2 case.
Well, the behavior is already different, which is what this patch is
trying to mitigate.
In case of HTTP/1.x, a single buffer with headers is produced.
In case of HTTP/2, two buffers are produced: one with headers and one
empty with last_buf = 1.
> Note, that in case of HTTP/1.x it always allocates r->request_body
> for the main request unless r->discard_body is set.
> Even if it doesn't break something in nginx at the first glance,
> there's always a chance that some 3rd-party modules can depend
> on this.
> Anyway, this change should be made either for both protocols or
> for none of them.
Fair enough, I'll update patch to always allocate r->request_body.
More information about the nginx-devel