Skip to content

Commit ef7c5f3

Browse files
committed
Prepare for release 4.7.0.
1 parent 15b7d47 commit ef7c5f3

File tree

11 files changed

+69
-10
lines changed

11 files changed

+69
-10
lines changed

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,45 @@
11
Change Log
22
==========
33

4+
## Version 4.7.0
5+
6+
_2020-05-17_
7+
8+
* New: `HandshakeCertificates.Builder.addInsecureHost()` makes it easy to turn off security in
9+
private development environments that only carry test data. Prefer this over creating an
10+
all-trusting `TrustManager` because only hosts on the allowlist are insecure. From
11+
[our DevServer sample][dev_server]:
12+
13+
```kotlin
14+
val clientCertificates = HandshakeCertificates.Builder()
15+
.addPlatformTrustedCertificates()
16+
.addInsecureHost("localhost")
17+
.build()
18+
19+
val client = OkHttpClient.Builder()
20+
.sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
21+
.build()
22+
```
23+
24+
* New: Add `cacheHit`, `cacheMiss`, and `cacheConditionalHit()` events to `EventListener`. Use
25+
these in logs, metrics, and even test cases to confirm your cache headers are configured as
26+
expected.
27+
28+
* New: Constant string `okhttp3.VERSION`. This is a string like "4.5.0-RC1", "4.5.0", or
29+
"4.6.0-SNAPSHOT" indicating the version of OkHttp in the current runtime. Use this to include
30+
the OkHttp version in custom `User-Agent` headers.
31+
32+
* Fix: Don't crash when running as a plugin in Android Studio Canary 4.1. To enable
33+
platform-specific TLS features OkHttp must detect whether it's running in a JVM or in Android.
34+
The upcoming Android Studio runs in a JVM but has classes from Android and that confused OkHttp!
35+
36+
* Fix: Include the header `Accept: text/event-stream` for SSE calls. This header is not added if
37+
the request already contains an `Accept` header.
38+
39+
* Fix: Don't crash with a `NullPointerException` if a server sends a close while we're sending a
40+
ping. OkHttp had a race condition bug.
41+
42+
443
## Version 4.6.0
544

645
_2020-04-28_
@@ -376,6 +415,7 @@ _2019-06-03_
376415
377416
[bom]: https://docs.gradle.org/6.2/userguide/platforms.html#sub:bom_import
378417
[bouncy_castle_releases]: https://www.bouncycastle.org/releasenotes.html
418+
[dev_server]: https://github.com/square/okhttp/blob/482f88300f78c3419b04379fc26c3683c10d6a9d/samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt
379419
[iana_websocket]: https://www.iana.org/assignments/websocket/websocket.txt
380420
[jetty_8_252]: https://webtide.com/jetty-alpn-java-8u252/
381421
[kotlin_1_3_71]: https://github.com/JetBrains/kotlin/releases/tag/v1.3.71
@@ -387,3 +427,4 @@ _2019-06-03_
387427
[rfc_2045]: https://tools.ietf.org/html/rfc2045
388428
[rfc_7231_647]: https://tools.ietf.org/html/rfc7231#section-6.4.7
389429
[rfc_7692]: https://tools.ietf.org/html/rfc7692
430+
[semver]: https://semver.org/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Our [change log][changelog] has release history.
102102
The latest release is available on [Maven Central](https://search.maven.org/artifact/com.squareup.okhttp3/okhttp/4.6.0/jar).
103103

104104
```kotlin
105-
implementation("com.squareup.okhttp3:okhttp:4.6.0")
105+
implementation("com.squareup.okhttp3:okhttp:4.7.0")
106106
```
107107

108108
Snapshot builds are [available][snap]. [R8 and ProGuard][r8_proguard] rules are available.
@@ -116,7 +116,7 @@ OkHttp includes a library for testing HTTP, HTTPS, and HTTP/2 clients.
116116
The latest release is available on [Maven Central](https://search.maven.org/artifact/com.squareup.okhttp3/mockwebserver/4.6.0/jar).
117117

118118
```kotlin
119-
testImplementation("com.squareup.okhttp3:mockwebserver:4.6.0")
119+
testImplementation("com.squareup.okhttp3:mockwebserver:4.7.0")
120120
```
121121

122122
License

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ ext.publishedArtifactId = { project ->
8989
allprojects {
9090
group = 'com.squareup.okhttp3'
9191
project.ext.artifactId = rootProject.ext.publishedArtifactId(project)
92-
version = '4.7.0-SNAPSHOT'
92+
version = '4.7.0'
9393

9494
repositories {
9595
mavenCentral()

docs/changelog_3x.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
OkHttp 3.x Change Log
22
=====================
33

4+
## Version 3.14.9
5+
6+
_2020-05-17_
7+
8+
* Fix: Don't crash when running as a plugin in Android Studio Canary 4.1. To enable
9+
platform-specific TLS features OkHttp must detect whether it's running in a JVM or in Android.
10+
The upcoming Android Studio runs in a JVM but has classes from Android and that confused OkHttp!
11+
12+
413
## Version 3.14.8
514

615
_2020-04-28_
@@ -209,6 +218,15 @@ _2019-02-04_
209218
* New: Log the TLS handshake in `LoggingEventListener`.
210219
211220
221+
## Version 3.12.12
222+
223+
_2020-05-17_
224+
225+
* Fix: Don't crash when running as a plugin in Android Studio Canary 4.1. To enable
226+
platform-specific TLS features OkHttp must detect whether it's running in a JVM or in Android.
227+
The upcoming Android Studio runs in a JVM but has classes from Android and that confused OkHttp!
228+
229+
212230
## Version 3.12.11
213231
214232
_2020-04-28_

mockwebserver/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ server.setDispatcher(dispatcher);
142142
### Download
143143

144144
```kotlin
145-
testImplementation("com.squareup.okhttp3:mockwebserver:4.6.0")
145+
testImplementation("com.squareup.okhttp3:mockwebserver:4.7.0")
146146
```
147147

148148
### License

okhttp-brotli/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ OkHttpClient client = new OkHttpClient.Builder()
1414
```
1515

1616
```kotlin
17-
implementation("com.squareup.okhttp3:okhttp-brotli:4.6.0")
17+
implementation("com.squareup.okhttp3:okhttp-brotli:4.7.0")
1818
```
1919

2020
[1]: https://github.com/google/brotli

okhttp-dnsoverhttps/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ API is not considered stable and may change at any time.
77
### Download
88

99
```kotlin
10-
testImplementation("com.squareup.okhttp3:okhttp-dnsoverhttps:4.6.0")
10+
testImplementation("com.squareup.okhttp3:okhttp-dnsoverhttps:4.7.0")
1111
```

okhttp-logging-interceptor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Download
3737
--------
3838

3939
```kotlin
40-
implementation("com.squareup.okhttp3:logging-interceptor:4.6.0")
40+
implementation("com.squareup.okhttp3:logging-interceptor:4.7.0")
4141
```
4242

4343

okhttp-sse/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ API is not considered stable and may change at any time.
77
### Download
88

99
```kotlin
10-
testImplementation("com.squareup.okhttp3:okhttp-sse:4.6.0")
10+
testImplementation("com.squareup.okhttp3:okhttp-sse:4.7.0")
1111
```

okhttp-tls/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ Download
227227
--------
228228

229229
```kotlin
230-
implementation("com.squareup.okhttp3:okhttp-tls:4.6.0")
230+
implementation("com.squareup.okhttp3:okhttp-tls:4.7.0")
231231
```
232232

233233
[held_certificate]: http://square.github.io/okhttp/4.x/okhttp-tls/okhttp3.tls/-held-certificate/

okhttp-urlconnection/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ This module integrates OkHttp with `Authenticator` and `CookieHandler` from `jav
66
### Download
77

88
```kotlin
9-
testImplementation("com.squareup.okhttp3:okhttp-urlconnection:4.6.0")
9+
testImplementation("com.squareup.okhttp3:okhttp-urlconnection:4.7.0")
1010
```

0 commit comments

Comments
 (0)