0.42.38
版本发布时间: 2023-10-12 07:29:19
apple/servicetalk最新发布版本:0.42.47(2024-07-26 05:05:49)
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
-
https://github.com/apple/servicetalk/commit/07a41d5e9a76736689c9518000bdff011fe25ff8 - 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
-
https://github.com/apple/servicetalk/commit/66f838c431cdc67465a4f5100da12e1f78858e25 - 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
-
https://github.com/apple/servicetalk/commit/a726670e6ca534ada4011085dce90364e815dc84 - 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
-
https://github.com/apple/servicetalk/commit/1a65e862794c85e211140dedff735c45624d2344 - 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
-
https://github.com/apple/servicetalk/commit/4fb2ac1ddb841364b14dc9f724e1789dc8079820 -
ConnectionObserver
: provideConnectionInfo
on transport handshake (#2726)- Deprecated
ConnectionObserver.onTransportHandshakeComplete()
- Introduced
ConnectionObserver.onTransportHandshakeComplete(ConnectionInfo)
instead
- Deprecated
New features
-
https://github.com/apple/servicetalk/commit/055374eeb42cd387ab61c8a1077e6560c574e696 - 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.
- https://github.com/apple/servicetalk/commit/6d38417eda5a8dcb351a358736e03c4e8ef450c9 - Support proxy for plaintext HTTP/2 clients with prior-knowledge (#2716)
-
https://github.com/apple/servicetalk/commit/66f838c431cdc67465a4f5100da12e1f78858e25 - Add
ConnectionObserver.ProxyConnectObserver
(#2711) -
https://github.com/apple/servicetalk/commit/4fb2ac1ddb841364b14dc9f724e1789dc8079820 -
ConnectionObserver
: provideConnectionInfo
on transport handshake (#2726) -
https://github.com/apple/servicetalk/commit/da1ea3ba5b68ee41a3244f7e71480e650c529d00 - Add
Publisher.replay
(#2684) -
https://github.com/apple/servicetalk/commit/b5761310a80a2dab0671b71fd9b7cc9dca401a53 - Add
Publisher.onCompleteError
(#2723) -
https://github.com/apple/servicetalk/commit/ec3c64a414f3444f8391bef60f16386f781c2e2b - 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
- https://github.com/apple/servicetalk/commit/4db1dab30255408f74b0244ad23494ac7ad36c63 - TLS handshake failures are not reported to observers when ALPN is used (#2712)
Improvements
-
https://github.com/apple/servicetalk/commit/b1dda8ca0247ee0b901c950ed2490f722b1ee2fb - Use
ChannelCloseUtils
inSniCompleteChannelSingle
(#2714) - https://github.com/apple/servicetalk/commit/ee7db1eaed50ecf1e523984f395da9bedd626f26 - Trigger channel read for TLS handshake only on the server-side (#2713)
-
https://github.com/apple/servicetalk/commit/2aacf9e6941b4d90fa24b8ad20e35f12184cdad6 - Remove unnecessary
proxyAddress
fromHttpClientBuildContext
(#2720) -
https://github.com/apple/servicetalk/commit/d8e55aacbc6a39e7edd1ce9a7a49809a0dcff709 - Use
Publisher.replay
operator (#2700) -
https://github.com/apple/servicetalk/commit/c92941cd9034a41a9d1e98b63dc77d193aac0194 -
ReplayStrategies.LazyTimeLimitedReplayAccumulator
trims and accumulate (#2725)
Dependencies
- https://github.com/apple/servicetalk/commit/ed5993195987698b8db7b5009d7c01829b5300a3 - Update Netty 4.1.99 -> 4.1.100 (#2727)
- https://github.com/apple/servicetalk/commit/7aea0974f0bcbf0e94a586a3312f959b43651c8f - Update netty io_uring 0.0.22 -> 0.0.23 (#2718)
Build/Release/Github actions
- https://github.com/apple/servicetalk/commit/5d372823041389730696adbe4c058fd675f8f7ae - CI: Enable JDK21 builds (#2707)
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