methanol v1.6.0 Release Notes

  • 30-5-2021

    • โž• Added HttpCache.Listener.
    • โž• Added TaggableRequest. This facilitates carrying application-specific data throughout interceptors & listeners. ```java var interceptor = Interceptor.create(request -> { var taggableRequest = TaggableRequest.from(request); var myContext = taggableRequest.tag(MyContext.class).orElseGet(MyContext::empty); ... }); var client = Methanol.newBuilder() .interceptor(interceptor) .build();

    var myContext = ... var request = MutableRequest.GET("") .tag(MyContext.class, myContext); var response = client.send(request, BodyHandlers.ofString());

    * ๐Ÿ›  Fixed disk cache possibly manipulating the disk index concurrently. This could happen if an index
      update is delayed, as the scheduler mistakenly ran the index write immediately after the delay evaluates instead
      of queuing it with the sequential index executor.
    * ๐Ÿ›  Fixed `TimeoutSubscriber` (used in `MoreBodySubscribers::withReadTimeout`) possibly calling
      downstream's `onNext` & `onError` concurrently. This could happen if timeout evaluates while downstream's
      `onNext` is still executing.
    * ๐Ÿšฆ Made `AsyncBodyDecoder` ignore upstream signals after decoding in `onNext` fails and the error is
      reported to `onError`. This prevents receiving further `onXXXX` by upstream if it doesn't immediately
      detect cancellation.
    * ๐ŸŒฒ Made the disk cache catch and log `StoreCorruptionException` thrown when opening an entry. This is
      done instead of rethrowing.
    * `Methanol` now always validates request's `URI` after being resolved with the optional base `URI`.
      Previously, the `URI` was only validated if there was a base `URI`.
    * โฌ†๏ธ Upgraded [gson to 2.8.7](