ThisaraWeerakoon opened a new pull request, #119: URL: https://github.com/apache/synapse/pull/119
## What Bumps `httpcore`/`httpcore-nio` from 4.3.3 (2014) to 4.4.16, and fixes a connection-lifecycle regression that the bump introduces in the `nhttp` transport. ## Why 4.3.3 is 18 releases and ~91 fixes behind. Among other things, 4.4.13+ tightened how outgoing header values are serialized: embedded carriage-return and line-feed characters within a header value are now normalized to a single space at write time, rather than passed through verbatim as 4.3.3 does. This brings Synapse's header output closer to what RFC 9112's field-value grammar expects, and is one of several correctness fixes bundled into this range of releases. ## The regression and its fix In httpcore ≤4.3.x, `DefaultNHttpServerConnection.produceOutput` cleared the connection's `WRITE` interest once its output buffer was drained. 4.4 removed that step to support request pipelining. `nhttp` doesn't pipeline, and it submits a response from a worker thread rather than the I/O dispatcher thread — with `WRITE` interest left permanently armed, the dispatcher thread keeps re-entering `produceOutput` and can touch the connection's (non-thread-safe) session output buffer at the same time a worker thread is writing a new response into it, corrupting its position/limit state. `SynapseNHttpServerConnection` (new) and `SynapseNHttpClientConnection` restore the 4.3.x `WRITE`-clearing behavior, on both the server and client side of `nhttp` connections. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
