Repository navigation
Handle HTTP/2 data on ignored streams after GOAWAY - #1174
sainadh777 wants to merge 1 commit into
Conversation
|
@markt-asf, this updates the GOAWAY ignored-stream handling and the Section 6.8 test you last changed; a review would be appreciated. |
|
I don't think this should be merged as is. I tested this with a running Tomcat and a raw HTTP/2 client. The change correctly handles DATA on streams ignored after GOAWAY, but it also silently accepts invalid DATA frames. When the connection is PAUSED, unknown streams are treated as ignorable regardless of their IDs. As a result, DATA on idle streams at or below the GOAWAY Last-Stream-ID, even-numbered stream IDs and previously closed streams that have been pruned is ignored instead of causing a connection error, as it does on main. RFC 9113 section 5.1 requires a PROTOCOL_ERROR for DATA on idle streams. Section 6.8 permits discarding frames on peer-initiated streams above the GOAWAY Last-Stream-ID, but this should not bypass normal validation for other streams. Please restrict the handling to streams that can legitimately be ignored after GOAWAY and add regression tests for the invalid cases. |
Summary
GOAWAYRationale and impact
RFC 9113 section 6.8 requires an endpoint that ignores newer streams after sending
GOAWAYto perform enough processing to maintain HPACK and connection flow-control state. Tomcat already decoded ignored header blocks, but DATA on those streams was rejected as a connection error. This narrowly changes that path to swallow the payload while preserving connection-level accounting; normal stream processing is unchanged.Validation
ant -Dtest.entry=org.apache.coyote.http2.TestHttp2Section_6_8 testfailed both sync and async variants withPROTOCOL_ERRORfor stream 5.ant -Dexecute.validate=true validate— passed (Checkstyle 14.4.0).ant clean— passed.ant -Dexecute.validate=true— passed (clean source build).ant -Dtest.entry=org.apache.coyote.http2.TestHttp2Section_6_8 test— passed, 6 tests, 0 failures, 0 errors, 0 skipped.ant -Dtest.openssl.path=/opt/homebrew/opt/openssl@3/bin/openssl test— passed, 43,125 tests, 0 failures, 0 errors, 496 platform/native-capability skips;BUILD SUCCESSFULin 24m49s.output/buildwith an isolatedCATALINA_BASE, received HTTP 200 fromhttp://127.0.0.1:18080/, stopped cleanly, and found no severe/error/exception markers incatalina.out.The first full-suite attempt selected macOS
/usr/bin/openssl(LibreSSL 3.3.6) and failed only the two OpenSSL cipher parser suites because LibreSSL does not support-ciphersuites. Those suites passed individually and the complete unfiltered suite passed after setting Tomcat'stest.openssl.pathproperty to Homebrew OpenSSL 3.6.3 as recorded above.