What's Changed
Bug fixes
- Don't wait for a response to a request rejected before sending.
process_request()reads the response even afterwrite_request()fails, so that an early response (e.g. 413/414) sent while the body is still being uploaded is not lost. A request whose request line or headers are rejected while it is being built in memory never reaches the socket, though, so no response will come, and the client blocked until the read timeout (or until the server closed the idle connection). Such a request now fails immediately withError::Write. Socket write failures still read the response as before. - Build
open_stream()'s request head in memory before sending.open_stream()wrote the request line and each header straight to the socket, so a header rejected by the header check left the request line and the headers before it on the wire. The request line and headers are now built in a buffer and written once, as the regular request path and the WebSocket handshake already do, so a rejected request leaves nothing on the wire.
Full Changelog: v0.57.1...v0.58.0