mirror of
https://github.com/swift-server/async-http-client.git
synced 2026-06-02 07:37:34 +00:00
324adb73ae
### Motivation In the `HTTP1ConnectionStateMachine` we set the connection state to `.closed` after having forwarded an error to the inner RequestStateMachine. Since we set the state to close, the `state.modify` function did not create an action that would close the connection. ### Changes - Modify the ConnectionState based on the RequestStateMachine's action only in the `state.modify` function. - Add a test to verify the fixed behavior. - Use ExpressibleByDictionaryLiteral syntax for some HTTPHeaders to increase readability. ### Result Connections are closed, if an error happens, while we are in a request.