]> git.kaiwu.me - nginx.git/commitdiff
HTTP/2: ignore unknown flags in the SETTINGS message
authorMarek Ludha <marek.ludha@eset.com>
Fri, 25 Sep 2026 13:19:04 +0000 (15:19 +0200)
committerSergey Kandaurov <pluknet@nginx.com>
Wed, 4 Nov 2026 20:11:29 +0000 (00:11 +0400)
This is required by RFC9113 section 4.1:
"Unused flags MUST be ignored on receipt"

src/http/v2/ngx_http_v2.c

index 35683ab75fd279da7c81de15dc7164d5d68bbc1a..b4297e929b74b24312477ad21f578fd72ea4c20e 100644 (file)
@@ -2222,7 +2222,7 @@ ngx_http_v2_state_settings(ngx_http_v2_connection_t *h2c, u_char *pos,
         return ngx_http_v2_connection_error(h2c, NGX_HTTP_V2_PROTOCOL_ERROR);
     }
 
-    if (h2c->state.flags == NGX_HTTP_V2_ACK_FLAG) {
+    if (h2c->state.flags & NGX_HTTP_V2_ACK_FLAG) {
 
         if (h2c->state.length != 0) {
             ngx_log_error(NGX_LOG_INFO, h2c->connection->log, 0,