Migrating from Jetty 12.0.x to Jetty 12.1.x
APIs Changes
HttpClient
In Jetty 12.0.x, applications could configure response content decoding through HttpClient.getContentDecoderFactories()
, and implement their own by implementing org.eclipse.jetty.client.ContentDecoder
.
In Jetty 12.1.x, applications can configure response content decoding through HttpClient.getContentDecoderFactories()
.
The decoding is based on the org.eclipse.jetty.compression.Compression
classes.
Applications can implement their own response content decoding by implementing a Compression
subclass and the corresponding DecoderSource
, based on the Content.Source
and Content.Chunk
APIs.
IteratingCallback
Class IteratingCallback
underwent refinements that changed the behavior of the onCompleteFailure(Throwable)
method.
In Jetty 12.0.x, IteratingCallback.onCompleteFailure(Throwable)
was called as soon as a failure was reported, without waiting the completion of the asynchronous operation (despite its name containing the word "complete").
For example, if a write operation performed with IteratingCallback
was pending due to TCP congestion, and a timeout happened, onCompleteFailure(Throwable)
was called as soon as the timeout happened, without waiting for the TCP congestion to resolve.
In Jetty 12.1.x, the same behavior is achieved by IteratingCallback.onFailure(Throwable)
, so applications should review their usage of IteratingCallback
and change the overrides of onCompleteFailure(Throwable)
to override onFailure(Throwable)
instead.