1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-14 07:22:20 +03:00
Commit Graph

3341 Commits

Author SHA1 Message Date
Jesse Wilson
875bfa3eef [maven-release-plugin] prepare release parent-3.12.1 parent-3.12.1 2018-12-23 12:41:42 -05:00
Jesse Wilson
de4225084f Prepare for 3.12.1 development 2018-12-23 12:36:32 -05:00
Jesse Wilson
880902873b Merge pull request #4438 from yschimke/remove_dupe_package_info
Remove overlapping package-info.java
2018-12-23 12:35:09 -05:00
Jesse Wilson
7f63a35ab1 [maven-release-plugin] prepare release parent-3.12.0 parent-3.12.0 2018-11-16 23:44:12 -05:00
Jesse Wilson
9e195fa37d Update changelog for OkHttp 3.12. 2018-11-16 23:35:11 -05:00
Jesse Wilson
2198975a42 Merge pull request #4388 from square/jwilson.1114.use_ec_not_ecdsa
Specify "EC" to generate  eliptic curve keys, not ECDSA
2018-11-15 07:27:17 -05:00
Jesse Wilson
d062472253 Specify "EC" to generate eliptic curve keys, not ECDSA
They're the same algorithm, but on Android API 27 only "EC" works;
"ECDSA" throws a NoSuchAlgorithmException.

Closes https://github.com/square/okhttp/issues/4175
2018-11-15 07:26:30 -05:00
Amir Livneh
1f7e796e6e Cleanup HttpLoggingInterceptor (#4346)
* Use try-with-resources

* Make bodyHasUnknownEncoding() static

* Fix nits in HttpLoggingInterceptorTest

* Revert "Use try-with-resources"

This reverts commit 57dcd61a9e.
2018-11-14 23:29:45 -05:00
Amir Livneh
ef34a41d09 Add a LoggingEventListener and use it in okcurl (#4353)
* Add LoggingEventListener and use it in okcurl

* Fix tests failing in IP6 environment

* Make less assumptions about test environment

* Disable retry in test to make test sequence more predictable

* Fix javadoc compilation

There seems to be inconsistency between javdoc parsing between 'mvn verify' and Travis CI. Before the change, 'mvn clean verify' passes but Travis CI fails due to missing import of okhttp3.OkHttpClient. Just adding the missing import, causes 'mvn verify' to fail die to unused import. Changing the line wrapping seems to appease 'mvn verify'.

* Address comments

* Remove unused imports
2018-11-13 21:58:22 -05:00
Jesse Wilson
8a01554770 Merge pull request #4376 from square/jwilson.1107.preemptive_auth
Preemptive auth for proxy CONNECT
2018-11-13 21:54:56 -05:00
Jesse Wilson
5a316c0b40 Preemptive auth for proxy CONNECT
All other forms of preemptive auth are nicely covered by interceptors,
but CONNECT doesn't get that luxury.

https://github.com/square/okhttp/issues/2435
2018-11-13 21:45:25 -05:00
Jesse Wilson
568a91c44a Merge pull request #4381 from square/jwilson.1112.weaken_immutable
Relax handling of Cache-Control: immutable
2018-11-12 23:05:34 -05:00
Jesse Wilson
764b31b3e2 Relax handling of Cache-Control: immutable
Previously we were treating this header as if the response would never
change. This was incorrect. The correct behavior according to RFC 8246
is that the 'immutable' directive only applies to conditional requests
made during the freshness lifetime. We don't make conditional requests
during the freshness lifetime, so the entire directive doesn't apply
to us.

https://github.com/square/okhttp/issues/4313
2018-11-12 22:31:16 -05:00
John Carlson
495b5f78a0 Add some docs for Cache class (#4375)
* Add some docs for cache

* Correction to size getter

* Update based on feedback
2018-11-07 22:01:01 +11:00
Jesse Wilson
1b4ab8a7f6 Merge pull request #4374 from square/jwilson.1106.websocket_releases
Fix connection leaks on failed web socket upgrades.
2018-11-07 19:37:42 +11:00
Jesse Wilson
62f2f82341 Fix connection leaks on failed web socket upgrades.
Closes: https://github.com/square/okhttp/issues/4258
2018-11-07 19:21:47 +11:00
Jesse Wilson
550afce3f8 Merge pull request #4372 from square/jwilson.1105.timeout_tests
Confirm that call timeouts don't apply to SSE or web sockets.
2018-11-07 19:20:11 +11:00
Jesse Wilson
081391095f Merge pull request #4373 from square/jwilson.1106.bouncy
Don't specify a crypto provider in HeldCertificate.
2018-11-07 19:19:19 +11:00
Jesse Wilson
2c95b0437b Don't specify a crypto provider in HeldCertificate.
Closes: https://github.com/square/okhttp/issues/4183
2018-11-06 21:48:46 +11:00
Jesse Wilson
04a74b2df4 Confirm that call timeouts don't apply to SSE or web sockets. 2018-11-06 21:42:34 +11:00
Jesse Wilson
af07e023f8 Add APIs to configure the client's default call timeout. (#4369)
* Add APIs to configure the client's default call timeout.

This isn't independently configured in an interceptor like the other
timeouts because it's already started by the time the interceptors run.

* Update okhttp/src/main/java/okhttp3/OkHttpClient.java

Co-Authored-By: swankjesse <jesse@swank.ca>

* Update okhttp/src/main/java/okhttp3/OkHttpClient.java

Co-Authored-By: swankjesse <jesse@swank.ca>
2018-11-06 21:21:20 +11:00
Jesse Wilson
9f9903e7a3 Recover from executor shutdowns gracefully. (#4365)
This turns out to be pretty difficult because of the way our
dispatcher works.

Calls can be rejected either immediately when the user calls
enqueue(), or later when a queued call is promoted.

It's also awkward because we don't want to hold locks when
calling the user's callFailed() method.
2018-11-05 07:49:01 +00:00
Jesse Wilson
bcbbfc6a54 Make the nested BasicAuthInterceptor static (#4368) 2018-11-05 07:46:46 +00:00
jjshanks
0a8f418644 Add basic auth interceptor recipe (#4336) 2018-11-04 18:05:01 +00:00
Jesse Wilson
74a74d19d1 Merge pull request #4363 from square/jwilson.1104.whole_operation_timeout
Whole operation timeouts
2018-11-05 00:15:00 +11:00
Jesse Wilson
5373160d20 Whole operation timeouts
Strictly-speaking this change is backwards-incompatible because it adds
a new method to the Call interface. The method returns the call's timeout.

The trickiest part of this is signaling the end of the call, which
occurs after the last byte is consumed of the last follow up request,
or when the call fails. Fortunately this is made easier by borrowing
the sites used by EventListener, which already plots out where calls
end.

https://github.com/square/okhttp/issues/2840
2018-11-05 00:06:12 +11:00
Jesse Wilson
296c510ae4 Merge pull request #4362 from square/jwilson.1104.schemes_
Make scheme names case-sensitive again.
2018-11-04 22:47:44 +11:00
Jesse Wilson
fbf243b880 Make scheme names case-sensitive again. 2018-11-04 07:49:39 +11:00
Yuri Schimke
2b0a9f4909 Remove colon when scheme missing in builder toString (#4361) 2018-11-03 13:39:20 +00:00
Yuri Schimke
70bf8e78b7 CipherSuite init speedup (#4340) 2018-11-03 13:17:22 +00:00
Jesse Wilson
f24f4130ac Merge pull request #4359 from square/jwilson.1103.rewrite_challenge_parser
Limit the use of regexes in the RFC 7235 challenge parser.
2018-11-03 19:14:34 +10:00
Jesse Wilson
d313ffcca0 Limit the use of regexes in the RFC 7235 challenge parser.
Creating patterns dynamically to do comma-escaping is pretty awkward.
This is more code but I have more confidence in it.
2018-11-03 19:59:22 +11:00
Yuri Schimke
59ab235004 Allow incomplete url builder toString usage (#4357)
The builder can be in a state that build() is not yet valid, but should have a valid toString for debugging purposes.
2018-11-03 08:42:42 +00:00
Jesse Wilson
8f3cd9f2db Merge branch 'jjshanks-gh-3921_x'
* jjshanks-gh-3921_x:
  APIs to set date headers
2018-10-31 08:33:01 -07:00
Joshua Shanks
c951e6ed88 APIs to set date headers 2018-10-31 08:32:50 -07:00
Jesse Wilson
0db43b248b Merge pull request #4352 from cakofony/ckozak/conscrypt_140
Upgrade Conscrypt to 1.4.0 (was 1.3.0)
2018-10-31 07:44:25 -07:00
Carter Kozak
801197e839 Upgrade Conscrypt to 1.4.0 (was 1.3.0) 2018-10-31 09:35:45 -04:00
Eddú Meléndez Gonzales
4e1f2816f3 Add maven bom (#4334)
See gh-4329
2018-10-29 20:11:21 +00:00
Jesse Wilson
f9ba36b8f1 Merge pull request #4339 from NightlyNexus/eric.httpurlbuilder-toString
Fail with clear message when missing scheme or host for HttpUrl.Builder.toString.
2018-10-25 21:49:53 -04:00
Eric Cochran
247ef5c054 Fail with clear message when missing scheme or host for HttpUrl.Builder.toString. 2018-10-25 14:20:40 -07:00
Benoît Quenaudon
13c2ae7900 Merge pull request #4327 from square/bquenaudon/2018-10-22/fix-alpn
Added ALPN version for java 8.191 and 8.192
2018-10-23 09:29:09 -04:00
Benoit Quenaudon
6c53f71b98 Added ALPN version for java 8.191 and 8.192 2018-10-23 07:45:39 -04:00
Benoît Quenaudon
72306fc706 Merge pull request #4326 from square/bquenaudon/2018-10-22/headerspart2
Replaced List<Header> by a queue of Headers into Http2Stream
2018-10-22 14:38:36 -04:00
Benoit Quenaudon
3739c5cf20 Replaced List<Header> by a queue of Headers into Http2Stream 2018-10-22 14:38:07 -04:00
Jesse Wilson
c1f88480f4 Merge pull request #4272 from shellhub/master
add methods overload support
2018-10-17 08:11:10 -04:00
Jesse Wilson
e3e59aea28 Merge pull request #4316 from square/bquenaudon/2018-10-15/testing
Added test to cover header drops with 100-continue
2018-10-16 11:51:41 -04:00
shellhub
2bccf45185 add methods overload support 2018-10-16 23:18:03 +08:00
Benoit Quenaudon
719c1b50de Added test to cover header drops with 100-continue 2018-10-15 14:02:41 -04:00
Jesse Wilson
93996d8035 Merge pull request #4314 from square/bquenaudon/2018-10-12/headers-through-frames
Send/Receive Headers via Http2 Frames
2018-10-12 18:47:11 -04:00
Benoit Quenaudon
c8cbb0d022 Send/Receive Headers via Http2 Frames 2018-10-12 18:32:03 -04:00