OkHttp v1.5.0 Release Notes
-
2014-03-07
0️⃣ OkHttp no longer uses the default SSL context.
🔧 Applications that want to use the global SSL context with OkHttp should configure their OkHttpClient instances with the following:
okHttpClient.setSslSocketFactory(HttpsURLConnection.getDefaultSSLSocketFactory());
0️⃣ A simpler solution is to avoid the shared default SSL socket factory. Instead, if you need to customize SSL, do so for your specific OkHttpClient instance only.
Synthetic headers have changed
Previously OkHttp added a synthetic response header,
OkHttp-Selected-Transport
. It has been replaced with a new synthetic header,OkHttp-Selected-Protocol
.🔄 Changes
- New: Support for
HTTP-draft-09/2.0
. - New: Support for
spdy/3.1
. Dropped support forspdy/3
. - New: Use ALPN on Android platforms that support it (4.4+)
- New: CacheControl model and parser.
- New: Protocol selection in MockWebServer.
- Fix: Route selection shouldn't use TLS modes that we know will fail.
- Fix: Cache SPDY responses even if the response body is closed prematurely.
- Fix: Use strict timeouts when aborting a download.
- Fix: Support Shoutcast HTTP responses like
ICY 200 OK
. - Fix: Don't unzip if there isn't a response body.
- Fix: Don't leak gzip streams on redirects.
- Fix: Don't do DNS lookups on invalid hosts.
- Fix: Exhaust the underlying stream when reading gzip streams.
- Fix: Support the
PATCH
method. - Fix: Support request bodies on
DELETE
method. - Fix: Drop the
okhttp-protocols
module. - Internal: Replaced internal byte array buffers with pooled buffers ("OkBuffer").
- New: Support for