OkHttp v5.0.0-alpha.2 Release Notes
-
2021-01-30
🚀 In this release MockWebServer has a new Maven coordinate and package name. A longstanding 🤡 problem with MockWebServer has been its API dependency on JUnit 4. We've reorganized things to ✂ remove that dependency while preserving backwards compatibility.
📦 | Maven Coordinate | Package Name | Description | | :------------------------------------------------------- | :-------------------- | :-------------------------------- | 🤡 | com.squareup.okhttp3:mockwebserver3:5.0.0-alpha.2 | mockwebserver3 | Core module. No JUnit dependency! | 🤡 | com.squareup.okhttp3:mockwebserver3-junit4:5.0.0-alpha.2 | mockwebserver3.junit4 | Optional JUnit 4 integration. | 🤡 | com.squareup.okhttp3:mockwebserver3-junit5:5.0.0-alpha.2 | mockwebserver3.junit5 | Optional JUnit 5 integration. | 🤡 | com.squareup.okhttp3:mockwebserver:5.0.0-alpha.2 | okhttp3.mockwebserver | Obsolete. Depends on JUnit 4. |
📦 The new APIs use
mockwebserver3
in both the Maven coordinate and package name. This new API is not stable and will likely change before the final 5.0.0 release.⚡️ If you have code that subclasses
okhttp3.mockwebserver.QueueDispatcher
, this update is not source 📦 or binary compatible. Migrating to the newmockwebserver3
package will fix this problem.- New: DNS over HTTPS is now a stable feature of OkHttp. We introduced this as an experimental module in 2018. We are confident in its stable API and solid implementation.
- Fix: Work around a crash in Android 10 and 11 that may be triggered when two threads
concurrently close an SSL socket. This would have appeared in crash logs as
NullPointerException: bio == null
. - Fix: Use plus
+
instead of%20
to encode space characters inFormBody
. This was a longstanding bug in OkHttp. The fix makes OkHttp consistent with major web browsers. - Fix: Don't crash if Conscrypt returns a null version.
- Fix: Include the public suffix data as a resource in GraalVM native images.
- Fix: Fail fast when the cache is corrupted.
- Fix: Fail fast when a private key cannot be encoded.
- Fix: Fail fast when attempting to verify a non-ASCII hostname.
- Upgrade: [GraalVM 21][graalvm_21].
- Upgrade: [Kotlin 1.4.20][kotlin_1_4_20].