Yuri Schimke
a5f8e4e5cb
Add test that covers MockWebServer and URLConnection with 100-Continue ( #8995 )
2025-08-03 23:38:00 +01:00
Yuri Schimke
8c3a3c98f5
Add a test of keep rules ( #8994 )
...
* Add a test of keep rules
2025-08-03 20:38:06 +01:00
renovate[bot]
cf4b91189c
Update com.squareup.okio to v3.16.0 ( #8975 )
...
* Update com.squareup.okio to v3.16.0
* Don't crash getting FakeSocket.inputStream
* delay creating buffered socket in MWS
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jesse Wilson <jwilson@squareup.com >
Co-authored-by: Yuri Schimke <yuri@schimke.ee >
2025-08-02 21:36:00 +01:00
Yuri Schimke
67c1b8e419
Split android OkHttpClient tests. ( #8991 )
...
* Split android OkHttpClient tests.
current tests were using a single client then
testing real network (facebook, ...) and localhost insecure.
Split so we get clearer failures.
2025-08-02 15:12:28 +01:00
Yuri Schimke
5eb71c8737
Run OSGi tests on JDK 17 ( #8989 )
2025-08-01 09:17:18 +01:00
renovate[bot]
823a5d0bb5
Update dependency gradle to v9 ( #8987 )
...
* Update dependency gradle to v9
* Add FakeMain configuration names
* Disable maven sympathy for okhttp-testing-support
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Yuri Schimke <yuri@schimke.ee >
2025-08-01 09:06:31 +01:00
Yuri Schimke
3004abe400
okhttp3.Gzip ( #8988 )
...
* okhttp3.Gzip
Top level object for consistency.
* reformat and apis
2025-08-01 06:04:22 +00:00
renovate[bot]
26ea650ecf
Update dependency com.android.tools.build:gradle to v8.12.0 ( #8986 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-31 14:47:58 -04:00
Yuri Schimke
eda4064d6a
Rename compression algorithms to be consistent. ( #8984 )
...
* Rename compression algorithms to be consistent.
Nice API for both Java and Kotlin devs.
With a test showing each.
Co-authored-by: Jake Wharton <github@jakewharton.com >
---------
Co-authored-by: Jake Wharton <github@jakewharton.com >
2025-07-31 19:34:32 +01:00
renovate[bot]
2fd8fad20b
Update dependency androidx.test.ext:junit to v1.3.0 ( #8982 )
...
* Update dependency androidx.test.ext:junit to v1.3.0
* Fix for JDK 8
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Yuri Schimke <yuri@schimke.ee >
2025-07-31 08:21:20 +00:00
Yuri Schimke
e1b2092e0a
Reduce flakes by not unit testing in check ( #8985 )
2025-07-31 08:17:47 +00:00
renovate[bot]
ec1c633a55
Update dependency androidx.test:runner to v1.7.0 ( #8980 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-31 05:15:48 +00:00
renovate[bot]
998aeeadc9
Update dependency androidx.test.espresso:espresso-core to v3.7.0 ( #8981 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-31 05:14:51 +00:00
renovate[bot]
d957cb52fa
Update dependency androidx.test.ext:junit-ktx to v1.3.0 ( #8983 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-31 05:13:05 +00:00
Jesse Wilson
4e7860212f
New BufferedSocket class ( #8977 )
...
* New BufferedSocket class
I'm starting to push Okio's socket throughout OkHttp,
and it turns out what I usually want is a BufferedSocket
instead.
* Flush not emit
* Track exception messages
* Use flush more
2025-07-31 00:18:40 -04:00
Jesse Wilson
3bafcf16fb
Re-implement web sockets support on the new Response.socket feature ( #8974 )
...
* Re-implement web sockets support on the new Response.socket feature
* Explain why we accept buffered streams
2025-07-29 18:04:11 -04:00
Jesse Wilson
7d53252fea
Use okio.Socket internally in OkHttp connections ( #8973 )
...
* Use okio.Socket internally in OkHttp connections
* Spotless
* Fix connection close timing
* Accept 'Socket is closed' or 'Socket closed'
* Another 'Socket is closed' message difference
* Rollback attempt to defer buffering source and sink
With H2_PRIOR_KNOWLEDGE the server can send settings
before we've sent anything.
---------
Co-authored-by: Jesse Wilson <jwilson@squareup.com >
2025-07-29 17:11:09 -04:00
Yuri Schimke
971101cacc
Add reusable CompressionInterceptor ( #8967 )
...
* Add reusable CompressionInterceptor.kt
Refactor Brotli and Zstd to use this, but also
allow trivial configuration of zstd,br,gzip.
2025-07-29 20:01:04 +00:00
Jesse Wilson
88593f8c28
New MockWebServerSocket helper class ( #8972 )
...
* New MockWebServerSocket helper class
This is work towards switching to use okio.Socket
as the implementation of web sockets.
* Fix RecordedRequestTest
---------
Co-authored-by: Jesse Wilson <jwilson@squareup.com >
2025-07-29 08:43:16 -04:00
Yuri Schimke
7c7d404e3c
Remote JvmStatic from OkHttp common. ( #8971 )
2025-07-28 21:33:04 +01:00
Tobias Gesellchen
286623ac57
Add support for HTTP/1.1 connection upgrades ( #8969 )
...
* Give the CountDownLatch something to count
* Fix typo
* Connection Upgrade for HTTP1 status code 101
See https://datatracker.ietf.org/doc/html/rfc9110#name-101-switching-protocols
* use socket.asOkioSocket()
* add socket to api
* remove the specific check on tcp connection upgrades
* create a dedicated HttpUpgradesTest
* chore
* add more test cases
* spotlessApply
* Use more MockWebServer features in tests
* Forbid HTTP/2
* Hook into Exchange for connection pool management
* Test events on successful upgrade
* Release the request body after an upgrade fails
* Upgrades don't promise a response body
* SpotlessApply
---------
Co-authored-by: Jesse Wilson <jwilson@squareup.com >
2025-07-28 10:39:28 -04:00
Yuri Schimke
07fe953b40
Add Android OkHttp.initialize(Context) ( #8965 )
...
* Add OkHttp.initialiseApplicationContext
A fallback for apps Disabling the AndroidX Startup Initialiser.
2025-07-28 08:33:49 +01:00
Jesse Wilson
0984bc3fc5
Improve operability of the crawler sample ( #8964 )
...
I was using it to exercise zstd and the queue
grows unbounded. Putting a limit on it doesn't
harm it.
Co-authored-by: Jesse Wilson <jwilson@squareup.com >
2025-07-22 20:58:06 -04:00
renovate[bot]
28f1c53600
Update dependency org.graalvm.buildtools.native:org.graalvm.buildtools.native.gradle.plugin to v0.11.0 ( #8947 )
...
* Update dependency org.graalvm.buildtools.native:org.graalvm.buildtools.native.gradle.plugin to v0.11.0
* Fix graal build
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Yuri Schimke <yuri@schimke.ee >
2025-07-22 21:31:49 +01:00
Yuri Schimke
50f1be974d
Add test demonstrating topPrivateDomain on Robolectric ( #8954 )
...
* Add test demonstrating topPrivateDomain on Robolectric
* Handle non robo case
2025-07-22 21:03:31 +01:00
renovate[bot]
5f474fd5a7
Update junit-framework monorepo ( #8958 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-22 20:59:42 +01:00
renovate[bot]
12b76b8c74
Update dependency com.diffplug.spotless:spotless-plugin-gradle to v7.2.1 ( #8963 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-21 17:48:17 -04:00
Jesse Wilson
cc12051513
Avoid a ClassCastException in ResponseBodySource.close ( #8961 )
...
Closes: https://github.com/square/okhttp/issues/8960
2025-07-21 17:26:46 -04:00
renovate[bot]
be3eb14298
Update dependency com.diffplug.spotless:spotless-plugin-gradle to v7.2.0 ( #8956 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-20 22:19:10 +01:00
Yuri Schimke
0ef99d67c4
Fix logging for Android10Platform ( #8955 )
2025-07-20 12:25:50 +01:00
Jesse Wilson
d51c177210
New zstd interceptor ( #8943 )
...
* New zstd interceptor
* Spotless
* Code review feedback
* Zstd 0.3.0
---------
Co-authored-by: Jesse Wilson <jwilson@squareup.com >
2025-07-19 09:41:00 -04:00
HyeokJun Kwon
a1a86c5774
Updated the readme documentation for mockwebserver #8910 ( #8922 )
...
* mockwebserver3 doc update
* convert java to kotlin
* Add Kotlin code to mockwebserver3 documentation
---------
Co-authored-by: Yuri Schimke <yuri@schimke.ee >
2025-07-19 14:40:52 +01:00
Yuri Schimke
ae2be353c3
Remove openjsse from proguard file ( #8949 )
2025-07-19 14:25:00 +01:00
Jesse Wilson
349aca55f0
Remove disclaimer about GraalVM ( #8900 )
...
Co-authored-by: Jesse Wilson <jwilson@squareup.com >
Co-authored-by: Yuri Schimke <yuri@schimke.ee >
2025-07-19 13:36:35 +01:00
Yuri Schimke
fbf5289d25
Test release build ( #8950 )
2025-07-19 13:35:48 +01:00
Yuri Schimke
48923141db
Fix okcurl shell command ( #8951 )
...
* build with new plugin
2025-07-19 09:48:55 +01:00
Thomas Wirth
58681d3e46
Fix r8_proguard.md link ( #8946 )
2025-07-19 08:07:23 +01:00
Yuri Schimke
4bcb3ad418
Remove OkcurlTest ( #8948 )
2025-07-19 08:07:01 +01:00
renovate[bot]
add175beea
Update dependency com.vanniktech:gradle-maven-publish-plugin to v0.34.0 ( #8940 )
...
* Update dependency com.vanniktech:gradle-maven-publish-plugin to v0.34.0
* Update build.gradle.kts
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jake Wharton <jw@squareup.com >
2025-07-16 16:35:59 -04:00
renovate[bot]
d5b3a7471b
Update graalvm to v24.2.2 ( #8941 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-15 15:23:02 +01:00
Yuri Schimke
807243e727
Run most builds on PRs ( #8939 )
...
* Run most builds on PRs
Seems that the filtered set is not a popular approach.
Assuming we have mostly non flaky builds, run more things on all builds (main, branches, prs).
* remove 25-beta
* Skip Okcurl test on Windows
2025-07-13 10:12:26 +01:00
Yuri Schimke
330264a589
Add -jvm and -android to BOM. ( #8932 )
...
* Add -jvm and -android to BOM.
Also uses from maven-test.
* Add -jvm and -android to BOM.
Also uses from maven-test.
* Update to Maven4
2025-07-13 09:32:01 +01:00
Yuri Schimke
9d71e2e8bb
Update docs for maven workaround ( #8938 )
2025-07-13 09:30:19 +01:00
Yuri Schimke
9eb967f8d4
Remote fetch-depth from github workflows ( #8929 )
2025-07-12 13:52:04 +01:00
renovate[bot]
48621eb2b8
Update dependency org.apache.maven.plugins:maven-deploy-plugin to v3.1.4 ( #8930 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-12 13:14:00 +01:00
renovate[bot]
d009da0f67
Update dependency org.apache.maven.plugins:maven-install-plugin to v3.1.4 ( #8931 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-12 13:13:50 +01:00
Yuri Schimke
85a5d3f5e3
Add a test of maven dependencies ( #8917 )
...
* Add a test of maven dependencies
* rename
* executable
* quiet
* Update AppTest.java
* Make okhttp3.internal.platform.PlatformInitializer multiprocess
* Make test self contained
* cleanup
* cleanup
2025-07-12 13:05:57 +01:00
renovate[bot]
f65e3e2159
Update dependency com.android.tools.build:gradle to v8.11.1 ( #8928 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-11 09:28:53 +01:00
renovate[bot]
86de0fc501
Update dependency org.jetbrains.kotlinx.binary-compatibility-validator:org.jetbrains.kotlinx.binary-compatibility-validator.gradle.plugin to v0.18.1 ( #8925 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-09 22:17:11 -04:00
Jesse Wilson
133dd83079
Update code samples for mockwebserver3 ( #8923 )
...
Closes: https://github.com/square/okhttp/issues/8920
Co-authored-by: Jesse Wilson <jwilson@squareup.com >
2025-07-09 20:57:24 -04:00