mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-27 05:04:23 +00:00
Context: Our services received (invalid) HTTP2 streams with a disallowed `connection` header. This caused a `nghttp2 error: Invalid HTTP header field was received: frame type: 1, stream: 23, name: [connection], value: [keep-alive]` to be logged, but also caused our serving process to crash subsequently in `onStreamCloseCallback`. After that was worked around, `doOneWrite` was called with a negative length. This patch does _not_ fix the underlying issue, it only prevents a hard crash of the process until we can migrate to the non-`nghttp2` implementation.