1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-14 07:22:20 +03:00
Commit Graph

5657 Commits

Author SHA1 Message Date
renovate[bot]
d596eee060 Update dependency com.puppycrawl.tools:checkstyle to v10.17.0 (#8393)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-22 17:22:22 +01:00
renovate[bot]
d3ab47f752 Update dependency com.google.android.gms:play-services-safetynet to v18.1.0 (#8438)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-22 17:21:54 +01:00
Yuri Schimke
dd7bbf4098 Update renovate rules 2024-06-22 17:18:31 +01:00
Yuri Schimke
45c470a1fd Disable connectionPreWarmingHttp2 for now (#8452) 2024-06-22 17:06:35 +01:00
renovate[bot]
c624cafbe7 Update dependency com.google.guava:guava to v33.2.1-jre (#8435)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-22 17:04:27 +01:00
renovate[bot]
7b3b7566e5 Update testcontainers-java monorepo to v1.19.8 (#8424)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-22 17:04:09 +01:00
renovate[bot]
b38dda707c Update dependency androidx.annotation:annotation to v1.8.0 (#8425)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-22 16:58:02 +01:00
renovate[bot]
b4d1ffd36b Update dependency org.robolectric:robolectric to v4.12.2 (#8422)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-22 16:54:10 +01:00
renovate[bot]
db291df762 Update dependency net.ltgt.gradle:gradle-errorprone-plugin to v4 (#8444)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-22 10:05:16 +01:00
Leo Lin
60de813ea5 Allow Nullable ExecutorService Parameter in Dispatcher Constructor (#8401)
Allow Nullable ExecutorService Parameter in Dispatcher Constructor to maintain backwards compatibility with OkHttp3 3.x migration to 4.x and beyond
2024-06-20 10:10:53 -04:00
renovate[bot]
54238b4c71 Update mcr.microsoft.com/devcontainers/java Docker tag to v21 (#8398)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-19 00:34:57 +01:00
Evan Nelson
bd611089c2 Fix an environment-specific bug in RouteFailureTest (#8409)
InetSocketAddress's constructor will try to resolve the host to an IP address. As a result, if you're on a network that happens to have a resolvable `myproxy` host, this test would fail -- and as it turns out, my home network does.

Instead, use InetSocketAddress.createUnresolved().
2024-05-14 10:48:07 -07:00
Endeavour233
62031cd8f4 fix UTF-32 BOM (#8407) 2024-05-13 09:42:37 -04:00
renovate[bot]
2f618f76a7 Update dependency com.google.guava:guava to v33.2.0-jre (#8397)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-06 06:06:52 +01:00
Jesse Wilson
d0b6a464d8 Start fewer threads in TaskRunner (#8391)
We've got a race where we'll start a thread when we need
one, even if we've already started a thread. This changes
TaskRunner's behavior to never add a thread if we're
still waiting for a recently-added one to start running.

This is intended to reduce the number of threads contenting
for the TaskRunner lock as reported in this issue:

https://github.com/square/okhttp/issues/8388
2024-04-28 20:33:04 -04:00
Evan Nelson
aede7c57f3 Fix ConnectionPoolTest bug (#8384)
1. Advance taskFaker time forward to the present when the test starts.
2. Stop having multiple factories and taskfakers floating around.
2024-04-24 05:40:49 +01:00
renovate[bot]
8d83f921eb Update dependency androidx.activity:activity-ktx to v1.9.0 (#8382)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-22 20:34:32 +01:00
Yuri Schimke
d0d7557822 Move to centralised loom safe locks (#8371) 2024-04-20 18:03:43 +01:00
Jesse Wilson
577d621585 Prepare next development version. 2024-04-17 21:32:42 -04:00
Jesse Wilson
35f490393f Prepare for release 5.0.0-alpha.14. parent-5.0.0-alpha.14 2024-04-17 21:31:39 -04:00
Jesse Wilson
d6613810ee Move coroutines extensions to okhttp3.coroutines (#8372)
* Move coroutines extensions to okhttp3.coroutines

This has the side-effect of fixing our packaging of this module.
Previously the okhttp-coroutines.jar contained the code from the
:okhttp artifact, not the :okhttp-coroutines artifact. I suspect
something in one of our build steps is incorrectly using the
package names (only) as a cache key, and it should instead be
using the package contents.

* apiDump
2024-04-17 21:24:38 -04:00
Jesse Wilson
5e1a3e959f Don't require a signing key to publish docs (#8368) 2024-04-17 09:52:16 -04:00
Jesse Wilson
668fce2b39 Prepare next development version. 2024-04-17 09:26:07 -04:00
Jesse Wilson
e274b91f87 Prepare for release 5.0.0-alpha.13. parent-5.0.0-alpha.13 2024-04-17 09:25:31 -04:00
Jesse Wilson
689d38873f Revert "Move RealCall and RealConnection to loom safe locks (#8290)" (#8367)
This reverts commit a673f45ba6.
2024-04-17 06:15:48 +01:00
Jesse Wilson
6bc0862e4e Improve some code comments (#8361) 2024-04-15 10:55:09 -04:00
Jesse Wilson
06a052939f Fix public APIs for kotlin.time.Duration (#8355)
* Fix public APIs for kotlin.time.Duration

Use this as our preferred API for accepting a duration in
OkHttpClient and CacheControl.

Also hide these functions from the Java API.

* Code review feedback

* Spotless

* apiDump
2024-04-15 09:41:01 -04:00
Jesse Wilson
360006a964 Don't declare our own HTTP status codes (#8362)
These already exist.
2024-04-15 09:24:48 -04:00
Yuri Schimke
a673f45ba6 Move RealCall and RealConnection to loom safe locks (#8290) 2024-04-15 08:37:21 +01:00
renovate[bot]
ce28a31379 Update gradle/wrapper-validation-action action to v3 (#8365)
* Update gradle/wrapper-validation-action action to v3

* Update build.yml

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jake Wharton <github@jakewharton.com>
2024-04-14 21:51:50 -04:00
Yuri Schimke
348a9510a6 Support codespaces (#8347)
* Create devcontainer.json

* vs code extensions

* simplify

* Switch to java image

* Check for android

* Check for android
2024-04-14 15:24:05 +01:00
Jesse Wilson
2b1100eae2 Fake time in ConnectionPoolTest (#8360) 2024-04-14 00:17:49 -04:00
Evan Nelson
73c3ea5e51 Add connection pool pre-warming tests (#8358)
1. The first test just needed to be uncommented now that https://github.com/square/okhttp/pull/8348 is merged
2. A second test was added to exercise http2-specific functionality
2024-04-12 11:57:34 -07:00
Jesse Wilson
822bad8169 Extract a test thread factory (#8356)
This is different from the production thread factory:
 - No daemon threads in tests. We don't need 'em.
 - Threads are numbered in tests. We do need that.
2024-04-11 18:09:35 -04:00
Jesse Wilson
27670f9eb1 Redo TaskFaker's internal queue (#8348)
* Redo TaskFaker's internal queue

Previously this used locks to stop threads from executing. Now
it uses a custom 'yield' function to accomplish a similar purpose.
The main benefit of the new approach is we're no longer subject
to unspecified lock release order - we maintain our own queue
and get true deterministic order of execution.

* Fix interruption

* Fixup tests

* Spotless

* Use an enum rather than two booleans
2024-04-10 21:59:58 -04:00
Jesse Wilson
d2e91f7cb4 Change parameter order for Cache constructor (#8338)
* Change parameter order for Cache constructor

Put FileSystem before Path, as is convention.

Also put this new constructor in the public API.

* apiDump

* Track the change in RunSurvey

* Track signature change
2024-04-10 15:46:48 -04:00
Jesse Wilson
5f008f382d Tidy RealConnectionPool's new policy code (#8345)
* Tidy RealConnectionPool's new policy code

* Fixup connection pool changes

* Rename policiesUpdater

* Unless it's old
2024-04-08 23:31:17 -04:00
renovate[bot]
f4af7f2033 Update plugin com.google.devtools.ksp to v1.9.23-1.0.20 (#8351)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-07 22:48:17 -04:00
renovate[bot]
461b5ac9de Update dependency org.robolectric:robolectric to v4.12.1 (#8350)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-07 22:47:59 -04:00
Yuri Schimke
dba8478dff Comments on loom test (#8340) 2024-04-06 12:15:46 +01:00
Minh
b4614e466c Hide the value of sensitive query parameters in log (#8242)
Add option to redact sensitive query params.
2024-04-06 10:14:38 +01:00
Jesse Wilson
c299d62c70 Put fastFallback into the public API (#8332)
* Put fastFallback into the public API

* Spotless
2024-04-06 00:21:33 -04:00
Jesse Wilson
212e0e17aa Put EventSources.createFactory into the public API (#8336)
It really needs to be in the public API because the
function it replaces is deprecated.
2024-04-06 00:18:15 -04:00
Jesse Wilson
eaa7e8267c Put Request.tag(KClass) into the public API (#8335) 2024-04-06 00:17:44 -04:00
Jesse Wilson
41a8abf8ea Put Protocol.HTTP_3 into the public API (#8333)
Just the symbol, not the protocol.
2024-04-06 00:17:33 -04:00
Jesse Wilson
4cad93bc4e Put the nice Request constructor into the public API (#8334) 2024-04-06 00:17:17 -04:00
Jesse Wilson
e367f47cec Put Cookie.sameSite into the public API (#8331) 2024-04-06 00:12:05 -04:00
Jesse Wilson
e707db1d86 Put JavaNetCookieJar into the public API (#8337) 2024-04-06 00:10:43 -04:00
Jesse Wilson
aef791ac36 Don't leak response bodies in executeAsync (#8330)
* Don't leak response bodies in executeAsync

Also make callers opt in to an unstable coroutines API. If the resource
cleanup coroutines API changes, we'll have to change this API.

Remove the OkHttp experimental API. This is a good enough API as far
as OkHttp is concerned.

* Spotless
2024-04-05 07:25:23 -04:00
Jesse Wilson
4becb22672 Make sure we have copyright headers (#8329) 2024-04-04 23:30:42 -04:00