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

3498 Commits

Author SHA1 Message Date
Jesse Wilson
d55661544b [maven-release-plugin] prepare release parent-3.13.0 parent-3.13.0 2019-02-04 23:32:45 -05:00
Jesse Wilson
b10e9c8184 Merge pull request #4590 from square/jwilson.0204.drop_the_bom
Drop the okhttp-bom module
2019-02-04 23:23:13 -05:00
Jesse Wilson
3f890a47cc Drop the okhttp-bom module
I think the benefit is unclear and it's already cost me 90 minutes of fighting
with Maven central.
2019-02-04 23:20:22 -05:00
Jesse Wilson
293700eeb2 Merge pull request #4589 from square/jwilson.0204.release_glitches
Fix some maven problems that are blocking the 3.13 release
2019-02-04 22:57:41 -05:00
Jesse Wilson
2b5337d14e Fix some maven problems that are blocking the 3.13 release 2019-02-04 22:47:15 -05:00
Benoît Quenaudon
bce0e669ba Merge pull request #4585 from square/jwilson.0203.mock_duplex_response_body
Improve testing in MockDuplexResponseBody
2019-02-04 14:03:08 -05:00
Jesse Wilson
392165d238 Improve testing in MockDuplexResponseBody 2019-02-03 21:56:39 -05:00
Jesse Wilson
668d48cde9 Merge pull request #4586 from gjoseph/patch-2
Actually 2019 ;)
2019-02-03 19:27:51 -05:00
Grégory Joseph
d8d0f7d12b Actually 2019 ;) 2019-02-04 11:06:17 +11:00
Jesse Wilson
85322d1ad7 Update changelog for 3.13 actually expected 2019-02-04 2019-02-02 15:29:25 -05:00
Jesse Wilson
fb94036db9 Update changelog for 3.13, expected 2019-02-04 2019-02-02 15:29:00 -05:00
Jesse Wilson
9cef522cac Merge pull request #4584 from square/jwilson.0202.nonascii_filename
Permit multipart filenames to contain non-ascii characters
2019-02-02 14:03:40 -05:00
Jesse Wilson
94c38da706 Permit multipart filenames to contain non-ascii characters
Closes: https://github.com/square/okhttp/issues/4564
2019-02-02 12:55:32 -05:00
iamdanfox
56f55d9914 Dispatcher no longer has quadratic behaviour (#4581)
* Dispatcher#promoteAndExecute is no longer quadratic

* Maintain map internally

* Factor out two deques to RunningCall class

* Checkstyle

* Revert map-based implementation

* RealCall tracks calls per host using an AtomicInteger

* Loop through both ready and queued

* Empty commit for CI
2019-02-01 07:00:50 -05:00
Jesse Wilson
0cbc1fcb65 Merge pull request #4582 from square/jwilson.0131.duplex_marker
Turn DuplexRequestBody into a marker interface.
2019-02-01 06:49:25 -05:00
Jesse Wilson
8dcfaf02b5 Turn DuplexRequestBody into a marker interface.
And later maybe a simple public method.
2019-01-31 19:42:06 -05:00
Jesse Wilson
2e958ae1a2 Merge pull request #4580 from square/bquenaudon/2019-01-28/killcallbacklonglivecallback
Decouples DuplexRequestBody from Callback and let the caller deal with that
2019-01-28 20:17:02 -05:00
Benoit Quenaudon
d50ea813cc Decouples DuplexRequestBody from Callback and let the caller deal with that 2019-01-28 14:45:03 -05:00
Jesse Wilson
2f4b90050e Merge pull request #4550 from square/jwilson.0111.nonoptional
Core TLS features are now non-optional on Android
2019-01-19 17:11:12 -05:00
Jesse Wilson
a96e04258e Merge pull request #4565 from square/jwilson.0117.duplex_tests
Add tests that exercise real duplex communication
2019-01-18 22:29:10 -05:00
Jesse Wilson
3512ec5c9b Add tests that exercise real duplex communication
We're currently broken because the Pipe doesn't flush. Will fix in Okio.
2019-01-17 22:44:56 -05:00
Jesse Wilson
165a092a97 Merge pull request #4566 from square/jwilson.0117.new_alpn_versions
Add Jetty-APLN profiles for Java 1.8.0_201 and 1.8.0_202
2019-01-17 22:44:36 -05:00
Jesse Wilson
35943daf18 Add Jetty-APLN profiles for Java 1.8.0_201 and 1.8.0_202
https://github.com/jetty-project/jetty-alpn/blob/master/docs/version_mapping.properties
2019-01-17 22:21:32 -05:00
Jesse Wilson
0ed47b3203 Merge pull request #4561 from square/jwilson.0116.use_pipe_fold
Upgrade to Okio 1.17.1.
2019-01-16 15:43:44 -05:00
Jesse Wilson
6edaf8cad4 Upgrade to Okio 1.17.1.
Use the new Pipe.fold() method to hook up the duplex sink.
2019-01-16 14:28:39 -05:00
Jesse Wilson
a912753b09 Merge pull request #4555 from square/jwilson.0114.trailers
Get trailers working for HTTP/1
2019-01-15 07:07:44 -05:00
Jesse Wilson
9d28d9c9e2 Get trailers working for HTTP/1
The most awkward part of this is the changes to the way MockResponse
handled chunked encoding. It used to consider trailers a part of its
chunked response; now it does not.
2019-01-14 22:33:54 -05:00
Jesse Wilson
e1e5ba8366 Merge pull request #4547 from square/bquenaudon/2019-01-05/newduplexapi
Finalizes Duplex APIs for gRPC
2019-01-13 21:53:15 -05:00
Benoit Quenaudon
7bdb700a3e Finalizes Duplex APIs for gRPC 2019-01-12 20:40:32 -05:00
Jesse Wilson
5c0591b135 Merge pull request #4549 from square/jwilson.0111.lambdas
Use lambdas where appropriate
2019-01-12 08:41:18 -05:00
Jesse Wilson
4fb5e71fe7 Core TLS features are now non-optional on Android
With a baseline of 5.0+ we will have session tickets, SNI, and ALPN.
2019-01-11 23:58:11 -05:00
Jesse Wilson
778e0334a4 Use lambdas where appropriate 2019-01-11 22:31:36 -05:00
Amir Livneh
1f822eb5d2 Merge pull request #4534 from amirlivneh/call-test-leaks
Test for and fix connection leaks in CallTest
2019-01-09 06:10:33 -08:00
Amir Livneh
2595a48119 Test for and fix connection leaks in CallTest
The connection leak in ConnectionReuseTest.connectionsAreNotReusedIfNetworkInterceptorInterferes() contaminated the shared connection pool and failed tests in CallTest.

Also removed calls to ConnectionPool.evictAll() that became redundant.
2019-01-07 09:58:06 -05:00
Benoît Quenaudon
bb4a067e06 Merge pull request #4540 from amirlivneh/flaky-websocket-test
Fix flaky WebSocketHttpTest.webSocketAndNetworkInterceptors
2019-01-07 09:03:35 -05:00
Amir Livneh
48e108000b Fix flaky WebSocketHttpTest.webSocketAndNetworkInterceptors
close() is already called on the client WebSocket in closeWebSockets().
2019-01-07 07:12:47 -05:00
Benoît Quenaudon
16372fa6f4 Merge pull request #4532 from amirlivneh/leak-in-unplanned-close-test
Respond to server-initiated closure with client-initiated closure
2019-01-05 20:38:46 -05:00
Amir Livneh
aeda2cb347 Respond to server-initiated closure with client-initiated closure
This fixes a connection leak in WebSocketHttpTest.unplannedCloseHandledWithoutFailure().

Fixes part of https://github.com/square/okhttp/issues/4515.
2019-01-05 13:23:41 -05:00
Jesse Wilson
318aa514b9 Merge pull request #4531 from amirlivneh/websocket-response-check-leak
Fix connection leak on failed WebSocket handshake
2019-01-05 12:45:25 -05:00
Jesse Wilson
7ddd4ac279 Merge pull request #4525 from amirlivneh/onopen-leak
Fix connection leak if WebSocketListener.onOpen() throws
2019-01-05 12:44:33 -05:00
Jesse Wilson
bf5b38b568 Merge pull request #4524 from amirlivneh/trivial-leaks
Fix connection leaks in WebSocketHttpTest due to not closing WebSockets
2019-01-05 12:43:22 -05:00
Amir Livneh
b4fef0f1bc Fix connection leak on failed WebSocket handshake
Note that as long as there are leaking tests, I can't commit an assertion that verifies the fix. Since all tests share the same OkHttpClient and ConnectionPool, a leaking test will cause such an assertion to fail for all subsequent tests. To test the fix, I added an assertion locally and ran each fixed test individually.
2019-01-04 13:47:38 -05:00
Jesse Wilson
660c6b9df4 Merge pull request #4528 from gjoseph/gjoseph-patch-1
Fix logging-interceptor artifactId in bom/pom.xml
2019-01-04 07:07:13 -05:00
Grégory Joseph
ee4f316e04 Fix logging-interceptor artifactId in bom/pom.xml
Although it'd probably be a better fix to change the actual artifactId of logging-interceptor to okhttp-logging-interceptor, this is a less disruptive change.
2019-01-04 12:21:55 +11:00
Amir Livneh
233ae4b423 Fix connection leaks in WebSocketHttpTest due to not closing WebSockets
Fixes part of https://github.com/square/okhttp/issues/4515.
2019-01-03 07:39:36 -05:00
Amir Livneh
ea957f6059 Fix connection leak if WebSocketListener.onOpen() throws
If WebSocketListener.onOpen() throws, failWebSocket() is responsible for releasing the allocated streams. Specifically it releases this.streams. Previously WebSocketListener.onOpen() was called after the streams were allocated but before they were assigned to this.streams. As a result the streams were not allocated if WebSocketListener.onOpen() threw.

Fixes part of https://github.com/square/okhttp/issues/4515.
2019-01-03 07:38:42 -05:00
Jesse Wilson
118152bf15 Merge pull request #4520 from amirlivneh/leaking-tests
Mark leaking WebSocket tests
2019-01-02 22:47:03 -05:00
Jesse Wilson
9fa5dab19a Merge pull request #4522 from PaulWoitaschek/patch-1
Updated the readme dependency version
2019-01-02 22:35:34 -05:00
Benoît Quenaudon
8e66eadeca Merge pull request #4521 from amirlivneh/websocketrecorder-logging
Fix WebSocketRecorder logging
2019-01-02 17:44:21 -05:00
Amir Livneh
ac153f5231 Fix WebSocketRecorder logging
Both WebSocketRecorder.onClosing() and WebSocketRecorder.onClose() currently use the string "onClose".
2019-01-02 14:15:48 -05:00