1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-17 08:42:25 +03:00
Commit Graph

2747 Commits

Author SHA1 Message Date
jwilson
2a5fb08b39 Don't fallback to no proxy after all configured proxies have failed.
Falling back to no proxy causes problems, particularly when the proxy is
adding some value.

Closes: https://github.com/square/okhttp/issues/2525
2016-11-14 20:39:09 -05:00
Jesse Wilson
6da4d59c20 Merge pull request #2974 from square/jwilson.1113.okio_hash_methods
Use Okio's hash methods.
2016-11-13 16:09:04 -05:00
jwilson
5bb4c0c293 Use Okio's hash methods. 2016-11-13 15:59:25 -05:00
Jake Wharton
c581f5ddc6 Merge pull request #2973 from square/jwilson.1113.linked
Always use LinkedHashMap. Never HashMap.
2016-11-13 07:50:10 -08:00
jwilson
d35436e12d Always use LinkedHashMap. Never HashMap. 2016-11-13 10:41:53 -05:00
Jake Wharton
c212d6f3ef Merge pull request #2972 from square/jwilson.1112.submit
Prefer Executor.execute() over Executor.submit().
2016-11-12 21:46:55 -08:00
jwilson
da568d0604 Prefer Executor.execute() over Executor.submit().
I fixed most of these 2 years ago when it was problematic, but I missed
one.
2016-11-12 22:40:25 -05:00
jwilson
8a1d95f451 Update changelog for 3.4.2. 2016-11-03 23:35:41 -04:00
Jesse Wilson
1096030157 Merge pull request #2957 from square/jwilson.1103.dr_http2_Tests
Tests for management of HTTP/2 connections that are shutdown.
2016-11-03 16:57:12 -04:00
Dave Roberge
4d73a3a65d Tests for management of HTTP/2 connections that are shutdown.
See: https://github.com/square/okhttp/issues/2756
2016-11-03 15:25:46 -04:00
Jesse Wilson
7411ad94ac Merge pull request #2956 from serj-lotutovici/sl/remove_synthetic_methods
Avoid generating synthetic accessor methods
2016-11-03 12:13:17 -04:00
Jesse Wilson
dedeab131a Merge pull request #2955 from square/jwilson.1101.graceful_disconnect
Make HTTP/2's DISCONNECT_AT_END more graceful.
2016-11-02 18:20:41 -04:00
Serj Lotutovici
d320598247 Avoid generating synthetic accessor methods
Affected:
- okhttp3.Request
- okhttp3.Response
- okhttp3.Cache
2016-11-02 19:06:54 +01:00
jwilson
5d70f5f7a7 Make HTTP/2's DISCONNECT_AT_END more graceful.
Rather than immediately and violently closing the HTTP/2 stream,
we initiate the shutdown sequence for a graceful disconnect.

This fixes StreamAllocation to avoid creating new streams on
shutdown connections. That behavior is not well tested, however.
That will come by integrating dave-r12's PR:

See https://github.com/square/okhttp/pull/2889
2016-11-01 20:58:10 -04:00
Jesse Wilson
37dab0df54 Merge pull request #2953 from sebkur/fix_typos
Fix a few typos
2016-11-01 08:01:43 -04:00
Sebastian Kürten
456105e5fd Fix a few typos 2016-11-01 12:52:20 +01:00
jwilson
98fa1aa4e7 Merge branch 'drlue-master'
* drlue-master:
  Fix challenge parsing to permit incorrectly ordered authentication headers.
2016-10-26 00:33:07 -07:00
Lukas Aichbauer
bb357db283 Fix challenge parsing to permit incorrectly ordered authentication headers.
Authentication headers with wrongly ordered parameters not following RFC 2617 were not recognized.

Closes: https://github.com/square/okhttp/issues/2780
2016-10-26 00:31:51 -07:00
Jesse Wilson
7de5351e9a Merge pull request #2935 from square/jwilson.1022.slack_client_example
A WebSockets sample that uses the Slack API.
2016-10-23 11:47:54 -04:00
Jesse Wilson
643ee3ffc9 Merge pull request #2936 from square/jwilson.1023.alpn_for_java8_111
Set an ALPN-boot version for Java 8 v111.
2016-10-23 11:47:46 -04:00
jwilson
bf5ade433f Set an ALPN-boot version for Java 8 v111. 2016-10-23 11:36:00 -04:00
jwilson
ce695b67fa A WebSockets sample that uses the Slack API.
Currently it just prints WebSockets messages as they arrive, never sending any.
In a follow-up I'd like to do that, and also start to use this to figure out
where and how our WebSockets client can be improved.

https://github.com/square/okhttp/issues/2902
2016-10-23 11:24:22 -04:00
Jesse Wilson
35e9c97820 Merge pull request #2927 from square/jwilson.1018.heads_have_empty_bodies
Add tests to confirm HEAD response bodies are empty.
2016-10-20 10:28:03 -04:00
jwilson
9851e20466 Add tests to confirm HEAD response bodies are empty.
OkHttp never returns null bodies for any request. But empty response
bodies are fine.

Closes: https://github.com/square/okhttp/issues/2879
2016-10-18 23:50:18 -04:00
jwilson
da27d0bfc2 Merge branch 'JemarJones-master'
* JemarJones-master:
  Fixed incorrect comment from #2883
2016-10-18 21:57:06 -04:00
Jemar Jones
1b0f58f8d0 Fixed incorrect comment from #2883 2016-10-18 21:56:57 -04:00
jwilson
e78f75858c Merge branch '15characterlimi-pinner-equals'
* 15characterlimi-pinner-equals:
  Fix Connection sharing across equivalent OkHttpClients
2016-10-18 21:34:43 -04:00
Tobias Thierer
27ece26172 Fix Connection sharing across equivalent OkHttpClients
Fixes https://github.com/square/okhttp/issues/2757

The OkHttpClient(Builder) constructor and both overloads of
OkHttpClient.Builder.sslSocketFactory() set a new CertificateChainCleaner
instance on the OkHttpClient.

Before this CL, CertificateChainCleaner, CertificatePinner and
TrustRootIndex used object rather than value identity semantics. This
caused Address.equals() to not recognize when addresses were equivalent,
which broke connection pooling across OkHttpClient instances.

This CL changes CertificateChainClaner, CertificatePinner and
TrustRootIndex to use value equality by overriding equals() and hashCode().

CertificatePinner.pins and BasicTrustRootIndex.subjectToCaCerts's values
have changed from List to Set because their order shouldn't matter.
This CL uses LinkedHashSet, although HashSet should also work.
2016-10-18 21:34:25 -04:00
Jake Wharton
a28fee5a2b Merge pull request #2917 from square/jwilson.1016.default_client
Use TestUtil.defaultClient in more tests.
2016-10-16 19:01:13 -04:00
jwilson
993c9c6a1d Use TestUtil.defaultClient in more tests.
The client it returns is less susceptible to environment-specific flakiness.
I suspect that some of our tests that pass locally and fail in continuous
integration may be due to such environment-specific behaviors.
2016-10-16 18:54:35 -04:00
Jesse Wilson
199e5ff34f Merge pull request #2907 from square/jw/okio
Okio 1.11.0.
2016-10-12 08:08:43 -04:00
Jake Wharton
af304b5a02 Okio 1.11.0. 2016-10-12 01:08:42 -04:00
Jake Wharton
019e9431cf Merge pull request #2905 from square/jw/forbid-writes-on-reader
Forbid writes from reader thread.
2016-10-12 00:09:59 -04:00
Jake Wharton
8ab575ebb7 Forbid writes from reader thread. 2016-10-12 00:01:45 -04:00
Jesse Wilson
33c24e4920 Merge pull request #2904 from square/jw/remove-prefix
Remove inconsistent 'send' prefix from message/ping methods.
2016-10-11 23:19:17 -04:00
Jake Wharton
90f6bcb21f Remove inconsistent 'send' prefix from message/ping methods. 2016-10-11 23:08:49 -04:00
Jesse Wilson
bb0b222f4c Merge pull request #2899 from Jawnnypoo/cache-docs
Add javadoc for cache call in the builder
2016-10-10 23:03:58 -04:00
John Carlson
196817a50d Add javadoc for cache call in the builder 2016-10-10 21:55:36 -05:00
Jesse Wilson
26d4e225f8 Merge pull request #2818 from square/jwilson.0829.update_the_cache
Fix conditional cache hits to update timestamp fields.
2016-10-05 22:47:02 -04:00
jwilson
8b680f30f4 Fix conditional cache hits to update timestamp fields.
Closes: https://github.com/square/okhttp/issues/2815
2016-10-05 22:33:03 -04:00
jwilson
10360b88ef Merge branch 'Tolriq-issue_2881'
* Tolriq-issue_2881:
  Keep the cause when sending ConnectException
2016-09-27 15:57:19 -04:00
Tolriq
e7d74f47ca Keep the cause when sending ConnectException 2016-09-27 15:57:09 -04:00
Jesse Wilson
59e70dad81 Merge pull request #2875 from square/jw/close-codes
Use web socket close codes 1005 and 1006 correctly.
2016-09-20 22:58:26 -04:00
Jake Wharton
bd8c48c1a4 Use web socket close codes 1005 and 1006 correctly.
These are used for an close frame that does not specify a status code and for when a network error occurs while trying to read data, respectively.
2016-09-20 19:52:25 -04:00
Jesse Wilson
71826717ec Merge pull request #2873 from square/jw/conveniences
Add convenience methods to WebSocketCall for symmetry with Call.
2016-09-20 13:16:50 -04:00
Jake Wharton
5ae1a9d8c9 Add convenience methods to WebSocketCall for symmetry with Call. 2016-09-20 12:15:31 -04:00
Jesse Wilson
765ffb3b1e Merge pull request #2872 from square/jw/writer-tweak
Inline single-use method in web socket writer.
2016-09-20 06:29:50 -04:00
Jake Wharton
6391877eba Merge pull request #2871 from square/jw/ping-pong-byte-string
Use ByteString for web socket ping/pong payloads.
2016-09-20 01:01:24 -04:00
Jake Wharton
814d254ab7 Inline single-use method in web socket writer. 2016-09-20 00:55:03 -04:00
Jake Wharton
6306aec01d Use ByteString for web socket ping/pong payloads. 2016-09-20 00:53:36 -04:00