]> git.kaiwu.me - nginx.git/commitdiff
gRPC: WINDOW_UPDATE after END_STREAM handling (ticket #1797).
authorRuslan Ermilov <ru@nginx.com>
Thu, 23 Apr 2020 12:10:26 +0000 (15:10 +0300)
committerRuslan Ermilov <ru@nginx.com>
Thu, 23 Apr 2020 12:10:26 +0000 (15:10 +0300)
As per https://tools.ietf.org/html/rfc7540#section-6.9,
WINDOW_UPDATE received after a frame with the END_STREAM flag
should be handled and not treated as an error.

src/http/modules/ngx_http_grpc_module.c

index 9e62d8e2a7b450abd0648d2e932edc58f63c4ff2..992211e73584eafa370588c96af263f217be953d 100644 (file)
@@ -2091,7 +2091,8 @@ ngx_http_grpc_filter(void *data, ssize_t bytes)
             }
 
             if (ctx->stream_id && ctx->done
-                && ctx->type != NGX_HTTP_V2_RST_STREAM_FRAME)
+                && ctx->type != NGX_HTTP_V2_RST_STREAM_FRAME
+                && ctx->type != NGX_HTTP_V2_WINDOW_UPDATE_FRAME)
             {
                 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
                               "upstream sent frame for closed stream %ui",