nginx/src
Maxim Dounin 5348706fe6 gRPC: generate error when response size is wrong.
As long as the "Content-Length" header is given, we now make sure
it exactly matches the size of the response.  If it doesn't,
the response is considered malformed and must not be forwarded
(https://tools.ietf.org/html/rfc7540#section-8.1.2.6).  While it
is not really possible to "not forward" the response which is already
being forwarded, we generate an error instead, which is the closest
equivalent.

Previous behaviour was to pass everything to the client, but this
seems to be suboptimal and causes issues (ticket #1695).  Also this
directly contradicts HTTP/2 specification requirements.

Note that the new behaviour for the gRPC proxy is more strict than that
applied in other variants of proxying.  This is intentional, as HTTP/2
specification requires us to do so, while in other types of proxying
malformed responses from backends are well known and historically
tolerated.
2020-07-06 18:36:25 +03:00
..
core Fixed removing of listening UNIX sockets when "changing binary". 2020-06-01 20:19:27 +03:00
event Upstream: drop extra data sent by upstream. 2020-07-06 18:36:22 +03:00
http gRPC: generate error when response size is wrong. 2020-07-06 18:36:25 +03:00
mail SSL: fixed ssl_verify_client error message. 2019-09-16 19:26:42 +03:00
misc Style: aligned ngx_null_command. 2017-07-12 11:34:04 +03:00
os Cache: introduced min_free cache clearing. 2020-06-22 18:03:00 +03:00
stream Stream: fixed processing of zero length UDP packets (ticket #1982). 2020-06-08 11:40:34 +03:00