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

211 Commits

Author SHA1 Message Date
Jesse Wilson
c53f8db73d Configure gradle artifact uploads 2019-03-17 09:13:01 -04:00
Jesse Wilson
dc1e870d24 Basic Gradle support 2019-03-17 00:16:26 -04:00
Jesse Wilson
695b46cb2e [maven-release-plugin] prepare for next development iteration 2019-03-13 23:42:40 -04:00
Jesse Wilson
44d51d0ceb [maven-release-plugin] prepare release parent-3.14.0 2019-03-13 23:42:33 -04:00
Benoît Quenaudon
6c4855a7c7 Use AssertJ in tests (#4713) 2019-03-13 21:07:33 -04:00
Jesse Wilson
4aca390e59 Delete long-deprecated OkUrlFactory.
Some OkHttp behavior was only tested via this API, so this PR includes a bunch
of test migration. The test migration is as mechanical as possible, so we aren't
really using idiomatic APIs yet in these tests.

The `okhttp-urlconnection` survives for the JavaNetCookieJar and the
JavaNetAuthenticator. We can't remove these any time soon unfortunately.
2019-03-02 12:23:17 -05:00
Jesse Wilson
0a59e68b16 [maven-release-plugin] prepare for next development iteration 2019-02-05 12:15:46 -05:00
Jesse Wilson
d28d2cec21 [maven-release-plugin] prepare release parent-3.13.1 2019-02-05 12:15:39 -05:00
Jesse Wilson
5ecd590c8c [maven-release-plugin] prepare for next development iteration 2019-02-04 23:32:52 -05:00
Jesse Wilson
d55661544b [maven-release-plugin] prepare release parent-3.13.0 2019-02-04 23:32:45 -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
778e0334a4 Use lambdas where appropriate 2019-01-11 22:31:36 -05:00
Jesse Wilson
0dc50f1112 Run IntelliJ inspections on the codebase
Some nullability warnings, some diamond operators, adopting Objects.equals(),
and some dead code elimination.
2019-01-01 12:41:06 -05:00
Jesse Wilson
52e251836a Adopt some Java 8 features: diamonds, StandardCharsets 2019-01-01 00:48:07 -05:00
Jesse Wilson
fee3e530ad Get rid of some Java 7 stuff.
Still more to do, but this is a start.
2018-12-31 21:58:41 -05:00
Jesse Wilson
bf8e653c3a Get the latest versions of things.
I used 'mvn versions:use-latest-versions' and also just a bunch of manual
fixing.
2018-12-28 15:53:46 -05:00
Dmitry Zolotukhin
32bf2f0fc1 Handle security exception when testing if conscrypt should be used (#4448)
* Handle security exception when checking if conscrypt is preferred.

* Handle security exception when getting the java.specification.version.

* Handle security exception when getting the http.agent property.

* Moved the System.getProperty try-catch block into Utils.
2018-12-23 10:57:18 -05:00
Yuri Schimke
f391dc5fd3 Add back to classes 2018-12-09 16:44:08 +00:00
Yuri Schimke
4b204037e6 Remove overlapping package-info.java 2018-12-09 16:39:34 +00:00
Jesse Wilson
c273b3be38 [maven-release-plugin] prepare for next development iteration 2018-11-16 23:44:19 -05:00
Jesse Wilson
7f63a35ab1 [maven-release-plugin] prepare release parent-3.12.0 2018-11-16 23:44:12 -05:00
Yuri Schimke
ceb42f1322 EverythingIsNonNull annotation (#4286)
Adds an annotation EverythingIsNonNull, and fixes some nullability on public API.
2018-09-30 09:33:42 +01:00
Jesse Wilson
7ef5f55d38 [maven-release-plugin] prepare for next development iteration 2018-07-12 23:41:09 -04:00
Jesse Wilson
95ae0cf421 [maven-release-plugin] prepare release parent-3.11.0 2018-07-12 23:41:00 -04:00
Jesse Wilson
37887141fe Rename TlsNode to HandshakeCertificates (#4141) 2018-07-12 06:39:20 +01:00
Jesse Wilson
db2ae92156 Fixup HeldCertificate so that it's worthy of production use.
This changes the default from the insecure 1024-bit RSA to a secure 256-bit ECDSA
key. It adds a new option to use RSA keys for interoperating with older clients.
2018-07-10 22:49:00 -04:00
Jesse Wilson
b1bfe7130c New okhttp-tls module 2018-07-09 12:00:28 -04:00
Jesse Wilson
31c511f694 Rename SslClient to TlsNode and make it a public API
https://github.com/square/okhttp/issues/3934
2018-07-08 15:33:16 -04:00
Jake Wharton
a2fb46b1a4 Merge pull request #4118 from square/jakew/parseOrThrow/2018-07-05
Add get(String) alternative which fails on invalid inputs
2018-07-06 15:49:25 -04:00
Jake Wharton
351b3d6bf7 Add get(String) alternative which fails on invalid inputs
This is an unchecked-throwing version of parse(String).
2018-07-06 15:30:55 -04:00
Jesse Wilson
aac684aeae Retain interrupted state when throwing InterruptedIOException
The drawbacks seem small; the callsite needs to handle interruption anyway
because the thread is prone to interruption.

And the upside is that a single interrupt should now be sufficient to break
out an in-flight OkHttp call.

Note that although we're fixing this, thread interruption is not well tested
in OkHttp. Most users should prefer Call.cancel(), which is well tested and
doesn't rely on the caller to know which threads OkHttp is using to make
the actual HTTP request.

Closes: https://github.com/square/okhttp/issues/3945
2018-07-05 22:37:24 -04:00
Dave Roberge
fb83491cc6 Ensure discarded HTTP/2 data frames free flow-control space. (#4033)
https://github.com/square/okhttp/issues/3915
2018-05-29 22:39:09 -04:00
Jesse Wilson
e86eb0e48b [maven-release-plugin] prepare for next development iteration 2018-02-24 13:33:57 -05:00
Jesse Wilson
c0739a4199 [maven-release-plugin] prepare release parent-3.10.0 2018-02-24 13:33:52 -05:00
Jesse Wilson
27c8a79302 First step towards HTTP/2 automatic pings. (#3874)
This changes the executor services in HTTP/2 connection to split up
listener executors (of which there may be many threads) from writer
executors (of which there is one per connection).

This adds a scheduled executor job to send pings on an interval. We
don't yet fail the connection if pongs are not received.

For follow-up there's some work to remove exising APIs to send pings
through the HTTP/2 APIs. These are unused and make it awkard to
confirm that only the automatic pings are being replied to.

See https://github.com/square/okhttp/issues/3261
2018-02-21 20:19:08 -05:00
Tobias Thierer
f704f9d30e OkHttpsURLConnection.setSSLSocketFactory(null): throw.
OkHttpsURLConnection extends javax.net.ssl.HttpsURLConnection.
The super class documentation says that setSSLSocketFactory(null)
throws IllegalArgumentException, but this implementation didn't
do that.

This CL fixed OkHttpsURLConnection.setSSLSocketFactory(null) to
throw, as specified.

Test: not done locally, relying on Travis.
2018-02-21 11:05:02 +00:00
Eric Cochran
2db8c41b3b Move and test toHumanReadableAscii. (#3851) 2018-02-18 06:57:59 -05:00
Yuri Schimke
14215b8b3f cleanup travis output (#3853) 2018-02-17 09:25:41 -05:00
Jesse Wilson
d0418379a7 Move MockWebServer's internal package to not collide with OkHttp's. (#3837)
Hoping this may prevent problems with the Java Platform Module System.
2018-02-09 06:20:57 +00:00
Yuri Schimke
d27531afa9 Use manifest entry for java 9 module name (#3743)
* Use manifest entry for java 9 module name

* add group

* specific names

* Update pom.xml

* Update pom.xml

* Update pom.xml

* Update pom.xml

* Update pom.xml

* Update pom.xml

* Update pom.xml

* Update pom.xml
2018-02-04 03:02:20 -05:00
Jesse Wilson
2bb2dc4340 [maven-release-plugin] prepare for next development iteration 2017-11-18 14:38:02 -05:00
Jesse Wilson
23b6f7556d [maven-release-plugin] prepare release parent-3.9.1 2017-11-18 14:37:50 -05:00
jwilson
51311219af [maven-release-plugin] prepare for next development iteration 2017-09-04 17:00:21 -04:00
jwilson
51663fd08f [maven-release-plugin] prepare release parent-3.9.0 2017-09-04 17:00:16 -04:00
Erik Ghonyan
b3ecb0a6c9 Add charset support for RFC 7617 challenges 2017-08-31 16:18:55 -04:00
jwilson
304d2c9630 [maven-release-plugin] prepare for next development iteration 2017-05-13 10:58:15 -04:00
jwilson
cb981daecf [maven-release-plugin] prepare release parent-3.8.0 2017-05-13 10:58:04 -04:00
jwilson
e7e22feb12 Fix Javadoc builds with the jsr305 dependency.
Because multiple modules share a package we need to share the dependency on
everything in package-info.java.
2017-05-13 10:51:29 -04:00
jwilson
83b9dd4275 Upgrade to Checktyle 7.7.
This allows us to put @Nullable immediately preceding the return type,
which is exactly where we want it.
2017-05-06 14:21:55 -04:00
jwilson
6f8cdcca1d [maven-release-plugin] prepare for next development iteration 2017-04-15 21:53:08 -04:00