0.42.38
This is a minor maintenance release appropriate for all ServiceTalk users that contains several useful improvements and bug fixes. This release is expected to be a "drop-in" replacement for all prior 0.42.X releases.
Changes
Behavior changes
- 07a41d5 - Move HTTP proxy
CONNECT
logic beforeConnectionFactoryFilter
s (#2697)- Previously, it was possible to use
ConnectionFactoryFilter
(s) to intercept HTTPCONNECT
requests to a proxy. In this release,CONNECT
requests are handled internally and they are not visible to users. (#2711) addsConnectionObserver.ProxyConnectObserver
to observe such requests, but if you have a different use-case that is not covered anymore (like setting auth headers), let us know by opening an issue.
- Previously, it was possible to use
- 66f838c - Add
ConnectionObserver.ProxyConnectObserver
(#2711)- The sequence of
ConnectionObserver
callbacks for proxy tunneled connections has changed in this release. Previously, those connections triggeredconnectionEstablished
, thenonSecurityHandshake
, and were ready to serve traffic only afterhandshakeComplete
callback. New behavior is that connections are always ready to serve traffic after eitherconnectionEstablished
ormultiplexedConnectionEstablished
callback is invoked.
- The sequence of
API deprecations
- a726670 - Deprecate
HttpContextKeys.HTTP_TARGET_ADDRESS_BEHIND_PROXY
(#2722)- This key was useful to distinguish the correct callback inside
ConnectionObserver
before reporting that a new connection is ready to take traffic. After (#2711) this is not necessary anymore because all connections are "ready" after "established" callback is invoked. Target address information will be provided viaConnectionObserver.onProxyConnect(...)
.
- This key was useful to distinguish the correct callback inside
- 1a65e86 - Improve exceptions thrown when an error happens during proxy
CONNECT
(#2721)- Deprecated
io.servicetalk.http.netty.ProxyResponseException
- Introduced
io.servicetalk.http.api.ProxyConnectResponseException
andio.servicetalk.http.api.ProxyConnectException
instead
- Deprecated
- 4fb2ac1 -
ConnectionObserver
: provideConnectionInfo
on transport handshake (#2726)- Deprecated
ConnectionObserver.onTransportHandshakeComplete()
- Introduced
ConnectionObserver.onTransportHandshakeComplete(ConnectionInfo)
instead
- Deprecated
New features
- 055374e - Implement HTTP proxy CONNECT with ALPN (#2699)
- Users can use either HTTP/1.1, HTTP/2, or gRPC protocol after establishing a secure tunnel through a proxy.
- 6d38417 - Support proxy for plaintext HTTP/2 clients with prior-knowledge (#2716)
- 66f838c - Add
ConnectionObserver.ProxyConnectObserver
(#2711) - 4fb2ac1 -
ConnectionObserver
: provideConnectionInfo
on transport handshake (#2726) - da1ea3b - Add
Publisher.replay
(#2684) - b576131 - Add
Publisher.onCompleteError
(#2723) - ec3c64a - Introduce tmp properties for Netty
decoderEnforceMaxRstFramesPerWindow
(#2728)- Netty version was upgraded to mitigate recently discovered "HTTP/2 Rapid Reset Attack" (CVE-2023-44487). While Netty added configuration options for netty-codec-http2 to control RST frames per time window, ServiceTalk introduced temporary system properties to let users change those options when they need to change the default values set by Netty:
-Dio.servicetalk.http.netty.http2.decoderEnforceMaxRstFramesPerWindow.maxConsecutiveEmptyFrames=200
-Dio.servicetalk.http.netty.http2.decoderEnforceMaxRstFramesPerWindow.secondsPerWindow=30
- Netty version was upgraded to mitigate recently discovered "HTTP/2 Rapid Reset Attack" (CVE-2023-44487). While Netty added configuration options for netty-codec-http2 to control RST frames per time window, ServiceTalk introduced temporary system properties to let users change those options when they need to change the default values set by Netty:
Bug Fixes
Improvements
- b1dda8c - Use
ChannelCloseUtils
inSniCompleteChannelSingle
(#2714) - ee7db1e - Trigger channel read for TLS handshake only on the server-side (#2713)
- 2aacf9e - Remove unnecessary
proxyAddress
fromHttpClientBuildContext
(#2720) - d8e55aa - Use
Publisher.replay
operator (#2700) - c92941c -
ReplayStrategies.LazyTimeLimitedReplayAccumulator
trims and accumulate (#2725)
Dependencies
- ed59931 - Update Netty 4.1.99 -> 4.1.100 (#2727)
- 7aea097 - Update netty io_uring 0.0.22 -> 0.0.23 (#2718)
Build/Release/Github actions
Thank you
Every idea, review, and bug-report counts and so we thought it is worth mentioning those who helped in this area. Please report any unintended omission.
@bryce-anderson
@daschl
@idelpivnitskiy
@mgodave
@Scottmitch
@tkountis