1
0
mirror of https://github.com/square/okhttp.git synced 2025-11-26 06:43:09 +03:00
Commit Graph

3619 Commits

Author SHA1 Message Date
Jesse Wilson
a217a390ee Merge pull request #4714 from amirlivneh/travis-verify
Run style check in Travis CI
2019-03-13 21:00:00 -04:00
Amir Livneh
d4afa4b9a4 Run style check in Travis CI 2019-03-13 16:55:03 -07:00
Amir Livneh
66ce79306b Merge pull request #4711 from amirlivneh/fix-style
Unbreak 'mvn verify'
2019-03-13 10:22:57 -07:00
Amir Livneh
f830f64916 Unbreak 'mvn verify' 2019-03-13 10:11:19 -07:00
Jesse Wilson
292764b156 Merge pull request #4705 from square/jwilson.0310.better_exceptions
Provide better exceptions when the shared HTTP/2 stream fails
2019-03-12 12:33:45 -04:00
Jesse Wilson
1a68cf15af Provide better exceptions when the shared HTTP/2 stream fails
Previously we always provided a generic StreamResetException. Now we provide
the exception that triggered the stream to be closed, if any.
2019-03-12 09:21:02 -04:00
Jesse Wilson
8e85dcd7f3 Prepare the changelog for our upcoming release 2019-03-09 22:39:12 -05:00
Jesse Wilson
1e956b9915 Merge pull request #4702 from square/jwilson.0309.full_op_timeouts_sse
Enforce full-call timeouts on SSE setup
2019-03-09 18:17:56 -05:00
Jesse Wilson
432381d9fb Enforce full-call timeouts on SSE setup
Once the response headers are received we go back to not having
any timeout enforced.

Closes: https://github.com/square/okhttp/issues/4646
2019-03-09 16:29:07 -05:00
Jesse Wilson
12bc2b7bde Merge pull request #4696 from galderz/t_websocket_randomfail
Release websocket transmitter before failing response #4695
2019-03-08 21:23:18 -05:00
Jesse Wilson
e7c533e4ac Merge pull request #4700 from yschimke/test_timeouts
Test Timeout to flush out hangs
2019-03-08 21:22:54 -05:00
Yuri Schimke
af72a230f3 Test Timeout to flush out hangs 2019-03-08 22:02:41 +00:00
Galder Zamarreño
e7a04f92a2 Release websocket transmitter before failing response #4695 2019-03-08 12:10:56 +01:00
Jesse Wilson
c912b90b8a Merge pull request #4690 from amirlivneh/rename-rule
Rename OkHttpClientTestingRule to OkHttpClientTestRule
2019-03-07 07:39:32 -05:00
Amir Livneh
018510fa40 Rename OkHttpClientTestingRule to OkHttpClientTestRule 2019-03-07 07:24:05 -05:00
Jesse Wilson
9059c15c67 Merge pull request #4684 from square/jwilson.0305.dontleak
Don't leak a connection if a WebSocket handshake fails
2019-03-06 20:55:54 -05:00
Jesse Wilson
dff5a61fc6 Don't leak a connection if a WebSocket handshake fails
I'm not particularly happy with all of the moving parts here. I think
perhaps doing web sockets over duplex is a possible fix here.

Closes: https://github.com/square/okhttp/issues/4658
2019-03-06 20:40:33 -05:00
Jesse Wilson
43f54df32f Merge pull request #4680 from amirlivneh/client-test-rule
Use a TestRule to check for connection leaks
2019-03-06 09:09:50 -05:00
Jesse Wilson
4e202e56c6 Merge pull request #4688 from amirlivneh/license-header
Add missing license header to CacheControl.java
2019-03-06 09:09:11 -05:00
Jesse Wilson
5dcff56604 Merge pull request #4686 from galderz/t_logmatch
Expand possible cipher suite options #4685
2019-03-06 07:55:08 -05:00
Amir Livneh
4a7f4aa118 Add missing license header to CacheControl.java 2019-03-06 07:14:31 -05:00
Amir Livneh
aca6785440 Use a TestRule to check for connection leaks 2019-03-06 06:21:15 -05:00
Galder Zamarreño
ee011b71cf More flexible cipherSuite matching #4685
* Match any cipher suites starting with TLS_
2019-03-06 09:07:22 +01:00
Jesse Wilson
8c37096896 Merge pull request #4681 from square/jwilson.0303.bye
Delete long-deprecated OkApacheClient.
2019-03-04 07:53:26 -05:00
Jesse Wilson
09c8a4475d Delete long-deprecated OkApacheClient. 2019-03-03 21:48:04 -05:00
Jesse Wilson
44d78247a5 Merge pull request #4678 from square/jwilson.0303.jdk1_8_202
Assume _anon_ cipher suites are unsupported.
2019-03-03 11:51:59 -05:00
Jesse Wilson
d6daca4aa7 Assume _anon_ cipher suites are unsupported.
Closes: https://github.com/square/okhttp/issues/4588
2019-03-03 11:27:19 -05:00
Jesse Wilson
6468239d31 Merge pull request #4676 from square/jwilson.0302.oneshot
New API: RequestBody.isOneShot()
2019-03-03 07:23:22 -05:00
Jesse Wilson
d261896d03 Merge pull request #4677 from amirlivneh/leak-checks
Test for connection leaks in more tests
2019-03-03 07:11:23 -05:00
Jesse Wilson
0f624b52be New API: RequestBody.isOneShot()
Closes: https://github.com/square/okhttp/issues/4134
2019-03-03 07:09:05 -05:00
Amir Livneh
851e37f52a Test for connection leaks in more tests
This will help prevent regressions and point to the leaking test, rather than to a later test that happens to checks for leaks. The change is applied to all tests that have an OkHttpClient member variable.
2019-03-02 16:51:18 -05:00
Jesse Wilson
c78269c364 Merge pull request #4675 from square/jwilson.0302.no_more_okurlfactory
Delete long-deprecated OkUrlFactory.
2019-03-02 14:37:07 -05:00
Jesse Wilson
4aca390e59 Delete long-deprecated OkUrlFactory.
Some OkHttp behavior was only tested via this API, so this PR includes a bunch
of test migration. The test migration is as mechanical as possible, so we aren't
really using idiomatic APIs yet in these tests.

The `okhttp-urlconnection` survives for the JavaNetCookieJar and the
JavaNetAuthenticator. We can't remove these any time soon unfortunately.
2019-03-02 12:23:17 -05:00
Jesse Wilson
cd0c8188a2 Merge pull request #4672 from amirlivneh/verify-fix
Make 'mvn verify' happy
2019-02-28 18:17:21 -05:00
Amir Livneh
fe7d1fa5f6 Make 'mvn verify' happy 2019-02-28 17:05:17 -05:00
Jesse Wilson
4085fb4037 Merge pull request #4665 from square/jwilson.0226.duplex_interceptors
Test that duplex works fine with interceptors
2019-02-27 11:26:23 -05:00
Jesse Wilson
3e2b26d7a1 Merge pull request #4666 from square/jwilson.0226.dont_log
Don't log duplex request bodies
2019-02-27 03:47:01 -05:00
Jesse Wilson
38eb03457c Don't log duplex request bodies
We may want to support these eventually but for now this is
unhelpful because they won't terminate.
2019-02-26 22:06:31 -05:00
Jesse Wilson
4bea2830d9 Test that duplex works fine with interceptors 2019-02-26 21:48:28 -05:00
Benoît Quenaudon
d673729061 Merge pull request #4663 from square/bquenaudon/2019-02-26/isduplex
Introduces isDuplex method to RequestBody
2019-02-26 14:18:08 -05:00
Benoit Quenaudon
c49abad3a2 Introduces isDuplex method to RequestBody 2019-02-26 12:05:56 -05:00
Jesse Wilson
4981f92e50 Merge pull request #4662 from square/jwilson.0226.timeout_early_exit
Apply whole-operation timeouts to setup of web sockets and duplex calls
2019-02-26 11:54:51 -05:00
Jesse Wilson
e6cfc2a508 Apply whole-operation timeouts to setup of web sockets and duplex calls
https://github.com/square/okhttp/issues/4646

Still need to figure out SSE.
2019-02-26 09:38:31 -05:00
Jake Wharton
966b003d54 Merge pull request #4661 from chsitter/feature/fix_doc_typo
Fix typo in WebSocket.close doc
2019-02-25 23:41:33 -05:00
Christoph Sitter
3560af192f Fix typo in WebSocket.close doc 2019-02-26 11:30:30 +07:00
Jesse Wilson
acae543e75 Merge pull request #4660 from square/jwilson.0225.timeouts
Include 'timeout' in exceptions when that's the root cause
2019-02-25 21:11:03 -05:00
Jesse Wilson
019008794f Merge pull request #4659 from amirlivneh/mockwebserver-leak
Fix memory leak in MockWebServer when using ALPN
2019-02-25 20:59:40 -05:00
Jesse Wilson
7f74fcc9bd Include 'timeout' in exceptions when that's the root cause
I'm not particularly happy with the way this code looks, but I like
the result. Otherwise exceptions are like these:

  * stream was reset: CANCEL
  * Socket closed
  * Canceled
2019-02-25 10:33:18 -05:00
Amir Livneh
8dfb1b8557 Fix memory leak in MockWebServer when using ALPN
Since Platform.afterHandshake() was never called, SSLSockets were not removed from ALPN's Map and could not be freed.
2019-02-25 10:14:49 -05:00
Jesse Wilson
284f59937e Merge pull request #4657 from square/jwilson.0224.credit_The_Public_Suffix_List
Credit The Public Suffix List for their awesome data.
2019-02-25 07:52:36 -05:00