mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-24 04:38:00 +00:00
Motivation: Currently, HEADERS frames are ignored by the client on a client-initiated stream after the client sends a GOAWAY. As per [Section 6.8 (GOAWAY) in RFC 9113](https://httpwg.org/specs/rfc9113#GOAWAY): _"Once the GOAWAY is sent, the sender will ignore frames sent on streams **initiated by the receiver** if the stream has an identifier higher than the included last stream identifier."_ In this case, the client (sender) should **not** ignore the HEADERS frame as the stream is initiated by the _client_, not the receiver. Modifications: Fixed the condition in the `receiveHeaders` function (given `LocallyQuiescingState`) in `ReceivingHeadersState.swift` to work for _both_ the client and server roles -- before this change, the condition is only correct when `self.role == ConnectionRole.server` Result: HEADERS frames are not ignored by the client on a client-initiated stream when locally quiescing.