]> git.kaiwu.me - nginx.git/commit
gRPC: narrowed special handling of "trailer only" responses
authorVinay Kumar Tokala <v.tokala@f5.com>
Wed, 22 Jul 2026 06:23:09 +0000 (23:23 -0700)
committerVinay Kumar Tokala <vinaykumar1591@gmail.com>
Wed, 5 Aug 2026 03:44:23 +0000 (09:14 +0530)
commitf340e7885a9f843161242724046055f250dae75b
tree5d6b0d22a238b5843acde10f2f1d2ea76f0f3ad8
parent4b90ec769235877ece7e104d992d17db665806da
gRPC: narrowed special handling of "trailer only" responses

Previously, the response length was explicitly set to zero if the
initial HEADERS frame was seen with the END_STREAM flag.  This was
meant to properly pass responses in the Trailers-Only format as
introduced in 6559a420134b.  This handling was too broad though,
passing incomplete responses that carry a non-zero Content-Length
to the client as if they were complete and empty.

Now such responses are caught by the existing checks later on and
are passed as incomplete, similarly to how this is handled elsewhere.
For instance, on HTTP/2 client connections this now results in proper
signalling, an incomplete stream followed by stream reset.
src/http/modules/ngx_http_grpc_module.c