OkHttp v5.0.0-alpha.4 Release Notes

  • 2022-02-01

    ๐Ÿš€ This release introduces fast fallback to better support mixed IPv4+IPv6 networks. Fast fallback is what we're calling our implementation of Happy Eyeballs, [RFC 8305][rfc_8305]. With this ๐Ÿ”‹ feature OkHttp will attempt both IPv6 and IPv4 connections concurrently, keeping whichever connects first. Fast fallback gives IPv6 connections a 250 ms head start so IPv6 is preferred on networks where it's available.

    ๐Ÿ— To opt-in, configure your OkHttpClient.Builder:

    OkHttpClient client = new OkHttpClient.Builder()
        .fastFallback(true)
        .build();
    
    • New: Change the build from Kotlin-JVM to Kotlin-multiplatform (which includes JVM). Both native and JavaScript platforms are unstable preview releases and subject to backwards-incompatible changes in forthcoming releases.
    • Fix: Don't crash loading the public suffix database resource in obfuscated builds.
    • Fix: Don't silently ignore calls to EventSource.cancel() made from EventSourceListener.onOpen().
    • Fix: Enforce the max intermediates constraint when using pinned certificates with Conscrypt. This impacts Conscrypt when the server's presented certificates form both a trusted-but-unpinned chain and an untrusted-but-pinned chain.
    • Upgrade: [Kotlin 1.6.10][kotlin_1_6_10].