1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-15 20:56:41 +03:00
Commit Graph

2786 Commits

Author SHA1 Message Date
jwilson
366bc4752b [maven-release-plugin] prepare release parent-3.5.0 parent-3.5.0 2016-12-01 12:53:45 -05:00
Jesse Wilson
7087dbc190 Merge pull request #3013 from square/jwilson.1130.cancel_after_close
If a graceful close doesn't work, cancel the websocket.
2016-12-01 12:45:14 -05:00
jwilson
4a50bcd30b If a graceful close doesn't work, cancel the websocket.
Closes: https://github.com/square/okhttp/issues/2788
2016-12-01 12:09:56 -05:00
Jesse Wilson
6ec60b1895 Merge pull request #3015 from square/jwilson.1130.redact_string
Change HttpURL.redact() to return a String.
2016-12-01 12:09:01 -05:00
Jake Wharton
b88bf5b038 Merge pull request #3018 from square/jwilson.1201.amp
Fix an invalid HTML entity in the SlackApi Javadoc.
2016-12-01 10:53:05 -05:00
jwilson
5d43df973a Fix an invalid HTML entity in the SlackApi Javadoc.
And-per-se-and
2016-12-01 10:52:06 -05:00
jwilson
ef6e605faf Change HttpURL.redact() to return a String. 2016-11-30 23:27:45 -05:00
jwilson
c3e31674ea Changelog for OkHttp 3.5.0. 2016-11-30 23:20:20 -05:00
Jake Wharton
802c029b82 Merge pull request #3014 from square/jwilson.1130.more_ws_tests
More test coverage for web sockets edge cases.
2016-11-30 22:19:33 -05:00
jwilson
e8ecf34175 More test coverage for web sockets edge cases.
Make sure interceptors and close reasons are validated thoroughly.
2016-11-30 22:13:16 -05:00
Jesse Wilson
4568075b1a Merge pull request #3008 from vanniktech/remove_synth_methods
Remove creation of synthetic accessor methods.
2016-11-30 16:36:05 -05:00
Niklas Baudy
d1e845a4df Remove creation of synthetic accessor methods. 2016-11-29 16:53:08 +01:00
Jesse Wilson
c5a26fefde Merge pull request #3005 from square/jwilson.1123.autoping
Automatically ping the peer on a user-specified interval.
2016-11-29 09:36:43 -05:00
jwilson
fa83afec25 Automatically ping the peer on a user-specified interval.
This changes RealWebSocket from using a shared ThreadPoolExecutor to
using a private ScheduledExecutorService. This make some of the code
simpler but it means that applications will hold 1 writer thread for
each websocket, even if it is mostly not writing.

Testing automatic pings is awkward. This refactors much of
RealWebSocketTest to make it more natural to reinitialize the
configuration.

Closes: https://github.com/square/okhttp/issues/2993
2016-11-29 09:14:35 -05:00
Jesse Wilson
0766099839 Merge pull request #3000 from square/jwilson.1121.strict_timeouts
Apply timeouts within individual frames.
2016-11-22 01:21:07 -05:00
Jake Wharton
d98cd564a6 Merge pull request #3001 from square/jwilson.1121.fix_flaky_test
Fix flakiness in authenticateWithChunkedStreaming().
2016-11-22 00:41:42 -05:00
jwilson
2b8ad31b08 Fix flakiness in authenticateWithChunkedStreaming().
We were prefering to return the networkResponse before the request
had completely failed. Instead we should return the network response
only on failure, and only for APIs that return failed responses.
2016-11-21 21:58:51 -05:00
jwilson
68c0211cc2 Apply timeouts within individual frames. 2016-11-21 20:01:45 -05:00
Jake Wharton
ccf88de917 Merge pull request #2999 from square/jwilson.1121.empty_close
Confirm that we correctly handle close frames without a code.
2016-11-21 19:47:07 -05:00
jwilson
d8226074ee Confirm that we correctly handle close frames without a code.
Closes: https://github.com/square/okhttp/issues/2940
2016-11-21 18:55:52 -05:00
Jesse Wilson
a72ed5ee7a Merge pull request #2996 from square/jwilson.1121.fix_some_autobahn_tests
Fix some Autobahn tests.
2016-11-21 12:47:16 -05:00
Jesse Wilson
850d4689a3 Merge pull request #2995 from square/dr.1121.avoid-data-frame
Avoid sending empty HTTP/2 data frames when there is no request body.
2016-11-21 12:35:18 -05:00
jwilson
85b2ad250a Merge branch 'danielgindi-patch-1'
* danielgindi-patch-1:
  Correct UTF8 BOM is EFBBBF
2016-11-21 12:32:27 -05:00
Daniel Cohen Gindi
22b250c1b8 Correct UTF8 BOM is EFBBBF 2016-11-21 12:32:18 -05:00
jwilson
c8dbccea5e Fix some Autobahn tests.
Bump the queue limit to 16 MiB for Autobahn tests. This is the ceiling they
use and necessary to pass their tests.

Move to port 9099. Port 9001 conflicts with supervisord.

Throw the right exceptions on close codes, at the right times.
2016-11-21 12:29:14 -05:00
Jake Wharton
4df16f3a5b Merge pull request #2991 from square/jwilson.1119.nio
Rename NewWebSocket to WebSocket.
2016-11-21 10:21:50 -05:00
Dave Roberge
578d8debd6 Avoid sending empty HTTP/2 data frames when there is no request body.
Closes: https://github.com/square/okhttp/issues/2892
2016-11-21 08:27:31 -05:00
Jesse Wilson
07309c1c7d Merge pull request #2992 from square/dr.1120.http2-recovery
Gracefully recover from an HTTP/2 connection shutdown at start of request.
2016-11-20 09:19:45 -05:00
Dave Roberge
86be1c3acd Gracefully recover from an HTTP/2 connection shutdown at start of request. 2016-11-20 07:54:58 -05:00
jwilson
949439ae5b Rename NewWebSocket to WebSocket.
The synchronous WebSocket class is gone.
2016-11-19 15:16:58 -05:00
Jake Wharton
14521ebe5f Merge pull request #2990 from square/jwilson.1118.migrate_WebSocketReaderTest
Migrate WebSocketReaderTest to the async API.
2016-11-19 14:20:38 -05:00
jwilson
ab73bddaa4 Migrate WebSocketReaderTest to the async API.
Also change reader's callback types to be strings and byte strings.
2016-11-18 22:16:08 -05:00
Jesse Wilson
395ae6f9b8 Merge pull request #2989 from square/jwilson.1117.migrate_mws_ws
Migrate MockWebServer to the async web sockets API.
2016-11-18 21:39:21 -05:00
jwilson
40dddb9dcf Migrate MockWebServer to the async web sockets API. 2016-11-18 21:34:02 -05:00
Jesse Wilson
aa095143a4 Merge pull request #2959 from square/jwilson.1105.ws_nonblocking_api
New non-blocking API for websockets.
2016-11-17 19:35:48 -05:00
Jesse Wilson
8223e5232f Merge pull request #2978 from square/jwilson.1114.always_return_full_bodies
Always prefer the server's returned response body.
2016-11-14 21:22:26 -05:00
jwilson
a27afaf572 Always prefer the server's returned response body.
Previously we would prefer the cached response if it had a newer
Last-Modified date.

Closes: https://github.com/square/okhttp/issues/2886
2016-11-14 20:52:43 -05:00
Jesse Wilson
35656b2f71 Merge pull request #2979 from square/jwilson.1114.no_proxy_fallback
Don't fallback to no proxy after all configured proxies have failed.
2016-11-14 20:46:45 -05:00
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
jwilson
49527dae14 New non-blocking API for websockets.
Currently this uses a placholder name, NewWebSocket. I'd like to get this
reviewed, expand it to cover MockWebServer's needs, and then I'll delete
the current blocking API.

Still undecided is which APIs to add - if any - to expose the state of the
web socket.

https://github.com/square/okhttp/issues/2902
2016-11-13 12:56:22 -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