1
0
mirror of https://github.com/square/okhttp.git synced 2025-08-01 16:06:56 +03:00

160 Commits

Author SHA1 Message Date
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
d2dd180697 Prepare for release 5.1.0. 2025-07-07 15:32:33 -04:00
1b703d52a9 Prepare for release 5.0.0. 2025-07-03 10:43:08 -04:00
27ddd2c286 Drop the findbugs dependency (#8769)
We don't need it.

Co-authored-by: Jesse Wilson <jwilson@squareup.com>
2025-05-13 20:51:50 -04:00
f2640e0b08 Create a friends configuration to use internals. (#8651)
* Create a friends configuration to use internals.

From https://www.liutikas.net/2025/01/12/Kotlin-Library-Friends.html we should avoid using

@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")

So instead lets just be friends.
2025-05-10 12:15:14 +01:00
a51cfbf841 Update dependency com.diffplug.spotless:spotless-plugin-gradle to v7 (#8702)
* Update dependency com.diffplug.spotless:spotless-plugin-gradle to v7

* Reformat

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jake Wharton <jw@squareup.com>
2025-03-19 15:25:20 -04:00
8cc665f95a Update org.bouncycastle to v1.79 (#8441)
* Update org.bouncycastle to v1.79

* Handle UnsupportedOperationException – if the underlying provider does not implement the operation

* Handle BC requirements on the key manager

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Yuri Schimke <yuri@schimke.ee>
2024-12-28 15:22:24 +00:00
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
a228fd64cc Reformat with Spotless (#8180)
* Enable spotless

* Run spotlessApply

* Fixup trimMargin

* Re-run spotlessApply
2024-01-07 20:13:22 -05:00
0e312d7804 Prepare to enable Spotless (#8179)
* Prepare to enable Spotless

I'm not super keen on any of these changes, but I am very
keen on having automatic formatting.

* Don't actually enable Spotless yet
2024-01-07 11:05:34 -05:00
23d67c304f Switch to assertFailsWith (#8177)
* Switch to assertk.fail

* Use assertFailsWith

* More assertFailsWith

* Use more assertFailsWith

* More assertFailsWith

* More assertFailsWith

* Native image dependencies

* Move JUnit dependency

* Don't lock in a specific implementation class

* Missing finally
2024-01-06 00:31:00 -05:00
eb6c016f6f Stop using AssertJ (#8174)
* Stop using AssertJ

This completes the migration to assertk.

* Fix a missing import

* Fix some type issues
2024-01-04 00:32:07 -05:00
9724956cb4 Convert more tests from Java to Kotlin (#8155) 2023-12-23 10:26:25 +00:00
e285d4e68b Even more assertk (#8151)
* Even more assertk

When we split tests into multiplatform we switched them
from AssertJ to assertk. I'm migrating everything over to
assertk so that I can merge tests back together without
changing assertion APIs.

* Fixup some type conversion problems
2023-12-20 20:54:49 -05:00
c9f62b501a Advertise 4.12.0 in docs 2023-12-17 10:34:10 -05:00
6ba49ad099 Upgrade Kotlin to 1.9.21, Okio to 3.7.0 (#8140)
* Upgrade Kotlin to 1.9.21, Okio to 3.7.0

* Suppress Boolean.hashCode warning

* call the right cancel

* More AnimalSniffer ignores
2023-12-17 09:19:21 -05:00
95cb15ab4d Disable javadoc (#8025) 2023-09-16 10:38:35 +01:00
248b0e6318 Update Release version (#7792) 2023-05-01 11:27:57 +01:00
f408411ff9 Avoid exposing internal methods (#7734) 2023-04-23 08:05:59 +01:00
4d1f8add89 Confirm we send SNI server names on the JDK9 Platform (#7597)
This introduces a new API in MockWebServer's RecordedRequest to
capture the inbound server names.

Co-authored-by: Yuri Schimke <yuri@schimke.ee>
2023-01-04 07:59:45 +10:00
847b5af240 Avoid InetAddress.getCanonicalHostName(). (#7607)
Just hard-coding 'localhost' is simpler and avoids problems where
the host machine's IP address has additional DNS registrations.

Closes: https://github.com/square/okhttp/issues/7603
2023-01-02 09:04:37 -05:00
fe6db78647 Get more TLS stuff passing on BouncyCastle (#7602)
There's something up with ECDSA on BouncyCastle, and rather
than figuring it out I've just switched to RSA signatures
with that provider.
2022-12-31 20:39:55 -05:00
58ee1ce170 Revert downgrade to 1.4 for gradle reasons (#7391)
* Revert "Downgrade to kotlin apiVersion 1.4 (#7267)"
* Revert "Improve runtime compatibility with kotlin 1.5.31 (#7343)"
* Revert "Remove usage of toDuration() (#7329)"
2022-07-25 17:57:09 +01:00
e9a3ad3d94 4.10.0 is out 2022-06-12 10:09:53 -04:00
6ad9fb12b6 Downgrade to kotlin apiVersion 1.4 (#7267)
* Test against kotlin 1.4

* Compile down to Kotlin 1.4

* Fix to use the invariant locale for lowercase

* Fix to use the invariant locale for lowercase
2022-06-08 10:44:30 -04:00
bdc213f180 Remove japicmp (#7118)
This plugin served us very well for a long time. But the binary
compatibility plugin is better suited for our current situation.
2022-02-27 10:20:06 -05:00
3e16ec28fe Adopt Kotlin's binary compatibility validator (#7112) 2022-02-26 14:17:33 -05:00
362f53546d Adopt Version Catalog and Updates plugin (#7075) 2022-02-15 23:38:32 +00:00
f5758b7f26 Enable Gradle's type-safe project accessors (#7069) 2022-02-08 20:01:28 +00:00
c30d9ad14b Convert more tests to Kotlin (#6980) 2022-01-05 00:20:25 -05:00
8debc78b00 Simplify gradle kts (#6931) 2021-11-27 12:31:27 +00:00
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
d0759a7907 Simplify kts (#6926)
* Simplify kts

* Use extensions

* Use extensions

* Simplify kts
2021-11-25 19:41:08 -05:00
3417fd0e78 Update README files to 4.9.3 (#6927) 2021-11-24 09:34:33 -05:00
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
a87f4b4585 Changelog for OkHttp 4.9.2 2021-09-30 21:13:35 -04:00
e1af67f082 Declare types & Cleanup (#6842)
* Declare types

* Code cleanup

* Declare types
2021-08-30 23:32:43 -04:00
e016350e5a Convert module gradle builds files to kts (#6830) 2021-08-12 08:36:23 +01:00
8e8c2a6037 Code cleanup (#6831) 2021-08-12 08:26:27 +01:00
90f8a7d26f Refactor applyOsgi & baselineJar to kotlin (#6823) 2021-08-12 07:52:29 +01:00
cc3ce11fc4 Code cleanup and imports (#6822) 2021-08-03 14:52:10 +03:00
b668b75f11 Replace deprecated methods (#6776) 2021-07-29 10:08:34 +03:00
7f4b97e8a4 Update docs to use https (#6642) 2021-04-22 08:30:57 +01:00
690cfa9b43 Fix animal sniffer build (#6635) 2021-04-15 08:41:10 +01:00
ef5d0c83f7 Update README files to 4.9.1 (#6617) 2021-04-10 07:42:40 +01:00
b607bb0aa8 Partial move to gradle kotlin (#6532) 2021-02-06 14:57:47 +00:00
168cbffb6e Fail on unencodable keys (#6468) 2020-12-28 20:46:01 -05:00
ec1d18d143 Quick Android Test Fixes (#6428) 2020-11-21 09:50:01 +00:00
d1cf4944f2 Junit import fail (#6429)
* Missed some imports

* Missed some imports

* Missed some imports
2020-11-19 21:23:18 -05:00
25814afb80 Move tls tests to Junit 5 (#6372) 2020-11-01 09:12:12 -05:00