mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Motivation: We had a bug which is happens in the combination of these states: - we held a request in the pipelining handler (because we're procesing a previous one) - a http handler error happened whilst a response's `.head` had already been sent (but not yet the `.end`) - the HTTPServerProtocolErrors handler is in use That would lead to this situation: - the error isn't held by the pipelining handler - the error handler then just sends a full response (`.head` and `.end`) but the actual http server already send a `.head`. So all in all, we sent `.head`, `.head`, `.end` which is illegal - the pipelining handler didn't notice this and beause it saw an `.end` it would send through the next requst - now the http server handler is in the situation that it gets `.head`, `.head` too (which is illegal) Modifications: - hold HTTP errors in the pipelining handler too Result: - more correctness