1
0
mirror of https://github.com/square/okhttp.git synced 2025-11-23 06:42:24 +03:00
Commit Graph

489 Commits

Author SHA1 Message Date
Yuri Schimke
362f53546d Adopt Version Catalog and Updates plugin (#7075) 2022-02-15 23:38:32 +00:00
Goooler
f5758b7f26 Enable Gradle's type-safe project accessors (#7069) 2022-02-08 20:01:28 +00:00
Yuri Schimke
bb8ecb9595 Test to verify half close behaviour (#7058) 2022-02-08 08:04:42 +00:00
Jesse Wilson
14218871df Change OkHttpClient.routeDatabase to be internal (#7017)
This is the only behavior change in the PR. The rest is converting
a test from Java to Kotlin (so it can see this internal member) and
getting a TaskRunner instance into the ExchangeFinder, hopefully
useful for implementing Happy Eyeballs.

Also fix up some formatting problems.
2022-01-16 13:05:24 -05:00
Jesse Wilson
c30d9ad14b Convert more tests to Kotlin (#6980) 2022-01-05 00:20:25 -05:00
Jesse Wilson
ab055862a4 Promote some util functions to commonMain (#6979)
Also migrate some tests that use these Util functions from Java to Kotlin.
If we're going to make OkHttp multiplatform, our tests need to be Kotlin
so we can run them on all supported platforms.
2022-01-03 16:41:53 -05:00
Yuri Schimke
54d22eb7b4 Confirm proxied request url is correct. (#6932) 2021-12-01 07:21:50 -05:00
Goooler
8debc78b00 Simplify gradle kts (#6931) 2021-11-27 12:31:27 +00:00
Jesse Wilson
d9a65a85c5 Switch to Vanniktech for Maven publishing (#6929)
* Switch to Vanniktech for Maven publishing

Steal configuration from Okio, which already works nicely.

* Update mockwebserver-junit5/build.gradle.kts

Co-authored-by: Benoît Quenaudon <bquenaudon@squareup.com>

Co-authored-by: Benoît Quenaudon <bquenaudon@squareup.com>
2021-11-26 06:58:00 -05:00
Goooler
3417fd0e78 Update README files to 4.9.3 (#6927) 2021-11-24 09:34:33 -05:00
Jesse Wilson
35bb1740a4 Convert the main build.gradle file to KTS (#6925)
I attempted to do a literal translation as much as possible.
Subprojects now need plugins to be configured directly so they
can use the appropriate syntax.
2021-11-24 07:19:39 +00:00
Jesse Wilson
fc14f6fd2a Change how we get a hostname for RecordedRequest.requestUrl (#6919)
Previously we did a reverse DNS lookup. But the correct strategy
is to look at the inbound ':authority' (HTTP/2) or 'Host' (HTTP/1)
header.

See: https://github.com/square/okhttp/pull/6774
2021-11-21 09:30:22 -05:00
Jesse Wilson
a87f4b4585 Changelog for OkHttp 4.9.2 2021-09-30 21:13:35 -04:00
Goooler
e1af67f082 Declare types & Cleanup (#6842)
* Declare types

* Code cleanup

* Declare types
2021-08-30 23:32:43 -04:00
Goooler
f54b300ece Convert SAM (#6828) 2021-08-28 13:38:04 +01:00
Goooler
8e8c2a6037 Code cleanup (#6831) 2021-08-12 08:26:27 +01:00
Goooler
cc3ce11fc4 Code cleanup and imports (#6822) 2021-08-03 14:52:10 +03:00
Yuri Schimke
07b53d7498 Avoid variable timing of DNS causing flaky tests (#6774) 2021-07-30 09:29:54 +03:00
Goooler
b668b75f11 Replace deprecated methods (#6776) 2021-07-29 10:08:34 +03:00
Christian Brunotte
13604c9799 Added QueueDispatcher.clear() (#6736)
Co-authored-by: Christian Brunotte <christian.brunotte@obi.de>
2021-07-28 10:39:00 +03:00
Goooler
ef5d0c83f7 Update README files to 4.9.1 (#6617) 2021-04-10 07:42:40 +01:00
Yuri Schimke
b607bb0aa8 Partial move to gradle kotlin (#6532) 2021-02-06 14:57:47 +00:00
Yuri Schimke
083315a473 Launcher for quick tests (#6437) 2020-11-21 13:28:45 +00:00
Yuri Schimke
d1cf4944f2 Junit import fail (#6429)
* Missed some imports

* Missed some imports

* Missed some imports
2020-11-19 21:23:18 -05:00
Artem Gavrilov
dabbd56572 Update README.md (#6389) 2020-11-03 16:56:25 -05:00
Jesse Wilson
59ae0c138d Convert more tests to JUnit 5 (#6366) 2020-11-01 05:46:35 +00:00
Yuri Schimke
f1bc9d1d33 Junit 5 experimental integration (#6339)
Early experimental Junit 5 integration to unblock Graal testing.
2020-10-24 05:03:17 +01:00
Jesse Wilson
9ee33446f8 Don't depend on JUnit in mockwebserver3 (#6329) 2020-10-18 12:37:48 -04:00
Jesse Wilson
3e331c1089 Rename okhttp3.mockwebserver to mockwebserver3 (#6327)
Also rename okhttp3.mockwebserverwrapper to okhttp3.mockwebserver

Directories are not renamed to minimize the git diff. That'll follow
in a separate commit.

Most users of the API are not impacted. The ones that are:
 - CallTest subclasses QueueDispatcher
 - DuplexTest uses duplex APIs
 - HttpOverHttp2Test subclasses QueueDispatcher

This is part 2 of the plan described here:
https://github.com/square/okhttp/pull/6326
2020-10-18 08:13:09 -04:00
Jesse Wilson
9533117948 Read the response even if writing the request fails (#6295)
Closes: 1001
2020-10-02 11:58:30 -04:00
Jesse Wilson
cbeaf8f955 Prepare for release 4.9.0. 2020-09-11 17:08:20 -04:00
Jesse Wilson
96a2118dd4 Release OkHttp 4.8.1. 2020-08-06 10:07:13 -04:00
Jesse Wilson
a70e992c3f Prepare for release 4.8.0. 2020-07-11 14:01:06 -04:00
Jesse Wilson
4c595553fb Prepare for release 4.7.2. 2020-05-20 09:06:47 -04:00
Jesse Wilson
186ec88aff Prepare for release 4.7.1. 2020-05-18 17:46:48 -04:00
Jesse Wilson
ef7c5f358e Prepare for release 4.7.0. 2020-05-17 13:52:53 -04:00
Jesse Wilson
0deadd5611 Prepare for release 4.6.0. 2020-04-29 00:52:51 -04:00
Yuri Schimke
d9c8fbf3b2 Confirm MockWebServer shutdown is idempotent (#5946) 2020-04-13 06:49:58 +01:00
Yuri Schimke
86b7ba5f2a Enable BouncyCastle on Android and add some testing (#5936) 2020-04-11 17:35:27 +01:00
Yuri Schimke
19771365f2 Rename to src/main/kotlin (#5938)
Follows the default path logic for kotlin classes.
2020-04-11 17:15:25 +01:00
Jesse Wilson
ca0c8d6a1a Prepare for release 4.5.0. 2020-04-06 10:54:10 -04:00
Jesse Wilson
10d5e69cd1 Get compression working in RealWebSocketTest
The only thing left is to negotiate extensions, including failing the
call if the server returns unexpected extensions.
2020-03-15 10:16:44 -04:00
Yuri Schimke
21029f48ce Switch Http2Connection to daemon for clients (#5834)
Allow for container usage where libraries/plugins may use OkHttp internally and it's not clear who cleans up.  This brings HTTP/2 inline with the daemon only behaviour of HTTP/1.1.
2020-03-02 19:35:05 +00:00
Jesse Wilson
44124ba2a3 Prepare for release 4.4.0. 2020-02-17 17:51:22 -05:00
Liam Newman
78016071b3 Add a windows executor to the build (#5769)
* Add a windows executor to the build

* Disable failing tests on windows

* Workaround find limitations
2020-02-05 21:09:37 -05:00
Jesse Wilson
e6cefb7a4d Switch to Gradle's Maven Publishing Plugin
This removes a bunch of low-value stuff from the pom.xml files:

 - name
 - description
 - licence distribution ('repo')
 - developers clause
 - test dependencies

I don't think any of this will be missed, and it shrinks the pom.xml
file to the minimal set of useful stuff.

This also causes us to publish a gradle .module file. This is the
motivation for this change. It'll allow us to ship a Gradle platform,
which is a more capable than a Maven BOM.
2020-01-19 21:44:55 -05:00
Jesse Wilson
c1d50e371f Upgrade Okio and some build dependencies
The new ktlint sorts imports which makes this diff large.

The new japicmp ignores 'final' modifier changes in final classes.

We adopt the Google style for checkstyle.xml.

Okio readByteString() now uses segments more aggressively, so we
need to mitigate that to avoid tracking those segments in a test.
2020-01-11 22:24:12 -05:00
Jesse Wilson
fd0919cfa4 OkHttp 4.3.1 is released 2020-01-07 13:44:16 -05:00
Yuri Schimke
15339353c1 Set hostname on Android 5.0 (#5702)
* Set hostname on Android 5.0

Android 5.0 requires explicit call to set the hostname.

* Fix test

* Fix
2020-01-06 21:54:52 -05:00
Yuri Schimke
328be6e739 Reduce logging in MockWebServer (#5696) 2020-01-05 07:51:05 +00:00