]> git.kaiwu.me - nginx.git/commit
gRPC: fixed handling of padding on DATA frames.
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 23 Mar 2021 13:52:23 +0000 (16:52 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 23 Mar 2021 13:52:23 +0000 (16:52 +0300)
commit11477fb633ddaf299f9be01f43aac322056d98dc
tree4b7462a03933f25c2aff0c10280cfdd7eb43edc2
parent02cca547704f710f26a7480d3fa6b476b0f1dccd
gRPC: fixed handling of padding on DATA frames.

The response size check introduced in 39501ce97e29 did not take into
account possible padding on DATA frames, resulting in incorrect
"upstream sent response body larger than indicated content length" errors
if upstream server used padding in responses with known length.

Fix is to check the actual size of response buffers produced by the code,
similarly to how it is done in other protocols, instead of checking
the size of DATA frames.

Reported at:
http://mailman.nginx.org/pipermail/nginx-devel/2021-March/013907.html
src/http/modules/ngx_http_grpc_module.c