1
0
mirror of https://github.com/square/okhttp.git synced 2025-11-26 06:43:09 +03:00
Commit Graph

120 Commits

Author SHA1 Message Date
Galder Zamarreño
ee011b71cf More flexible cipherSuite matching #4685
* Match any cipher suites starting with TLS_
2019-03-06 09:07:22 +01:00
Jesse Wilson
38eb03457c Don't log duplex request bodies
We may want to support these eventually but for now this is
unhelpful because they won't terminate.
2019-02-26 22:06:31 -05:00
Jesse Wilson
aac6c8da07 Introduce EventListener.requestFailed, responseFailed events
These replace requestBodyEnd() / responseBodyEnd() in some failure scenarios.
They may also be issued in cases where no event was published previously.
2019-02-23 18:39:11 -05:00
Yuri Schimke
50df11c471 Build with 3 JDK targets (#4568)
* Build with 3 targets

* Update maven

* remove jdk 12 ea

* Try without errorprone temporarily

* Still set 1.8

* javadoc tolerance

* Profiles for 10 + 11

* More tolerant

* JDK 11 test skipping

* Cleanup imports

* Link to github issues

* Support JDK 12 building
2019-02-09 07:32:49 -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
778e0334a4 Use lambdas where appropriate 2019-01-11 22:31:36 -05:00
Jesse Wilson
5f4a2642c0 Use automatic-resource-management blocks. 2019-01-01 21:50:44 -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
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
Yuri Schimke
f38c74130d Log handshake in LoggingEventListener (#4397) 2018-11-20 05:44:20 +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
Amir Livneh
1f7e796e6e Cleanup HttpLoggingInterceptor (#4346)
* Use try-with-resources

* Make bodyHasUnknownEncoding() static

* Fix nits in HttpLoggingInterceptorTest

* Revert "Use try-with-resources"

This reverts commit 57dcd61a9e.
2018-11-14 23:29:45 -05:00
Amir Livneh
ef34a41d09 Add a LoggingEventListener and use it in okcurl (#4353)
* Add LoggingEventListener and use it in okcurl

* Fix tests failing in IP6 environment

* Make less assumptions about test environment

* Disable retry in test to make test sequence more predictable

* Fix javadoc compilation

There seems to be inconsistency between javdoc parsing between 'mvn verify' and Travis CI. Before the change, 'mvn clean verify' passes but Travis CI fails due to missing import of okhttp3.OkHttpClient. Just adding the missing import, causes 'mvn verify' to fail die to unused import. Changing the line wrapping seems to appease 'mvn verify'.

* Address comments

* Remove unused imports
2018-11-13 21:58:22 -05:00
Jesse Wilson
4c1e981661 Merge pull request #4304 from amirlivneh/logging-interceptor-doc
Document HttpLoggingInterceptor.redactHeader()
2018-10-04 21:48:03 -04:00
Amir Livneh
be245e75cd Document HttpLoggingInterceptor.redactHeader() 2018-10-04 09:32:29 -04: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
Amir Livneh
d2ddd4ef9d Support header redaction in HttpLoggingInterceptor (#4287)
Add redactHeader() method that allows clients to mark (case insensitive) headers carrying private data that can't be logged.
2018-09-24 19:44:56 +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
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
36f4fd04f7 Add parse overload which fails on invalid inputs 2018-07-05 23:18:15 -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
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
Matt Sheppard
bb304b9c2c Log gzipped bodies when HttpLoggingInterceptor is used as a NetworkInterceptor (#3792)
* (in-progress) Support gzipped bodies as a networkInterceptor

* Fixed buffer cloning, added test for a still-unsupported encoding (Brotli)

* Avoid try-with-resources and too-long lines to appease build checks

* Fixed method name typo

* Added suggested comma between byte and gzipped-byte count

* Account for added comma in test

* Use buffer.writeAll to ensure all body content is read

* Indentation consistency

* Added test to confirm response body remains valid
2018-01-28 11:33:00 -05:00
Shaishav Gandhi
c22be89f4b Update to new Gradle dependency configurations (#3723)
* Update to new Gradle dependency configurations

Signed-off-by: shaishavgandhi05 <shaishgandhi@gmail.com>

* Add note for "api" usage

Signed-off-by: shaishavgandhi05 <shaishgandhi@gmail.com>

* Remove note on implementation vs. api depenedency
2017-12-17 14:01:32 -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
Jesse Wilson
207f5579d3 Omit the message from MockWebServer's HTTP/2 :status header (#3556)
This was a bug carried over from SPDY.

Closes: https://github.com/square/okhttp/issues/3484
2017-08-30 18:25:44 -04:00
Jesse Wilson
16f43b6439 Don't log a protocol when it is unknown. (#3558)
Closes: https://github.com/square/okhttp/issues/3395
2017-08-30 14:04:53 -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
011b2ee76d Import jsr305 and use it to mark @Nullable stuff.
This library is a provided dependency and is not necessary to be included
by OkHttp users.

This currently covers the okhttp and okhttp-logging-interceptor modules
only. It does not cover the 'internal' package in OkHttp, or its test cases.
We can add those as needed.
2017-05-06 15:25:55 -04:00
jwilson
6f8cdcca1d [maven-release-plugin] prepare for next development iteration 2017-04-15 21:53:08 -04:00
jwilson
e56f561e93 [maven-release-plugin] prepare release parent-3.7.0 2017-04-15 21:53:02 -04:00
Jesse Wilson
3e126109c4 Merge pull request #3143 from square/jwilson.0129.bogus_charsets
Change MediaType's failure mode to not crash on charset problems.
2017-01-30 09:10:18 -05:00
jwilson
9690110f81 [maven-release-plugin] prepare for next development iteration 2017-01-29 14:14:39 -05:00
jwilson
9dc1bbad24 [maven-release-plugin] prepare release parent-3.6.0 2017-01-29 14:14:33 -05:00
jwilson
6651a9c15e Change MediaType's failure mode to not crash on charset problems.
As-is it throws unchecked exceptions on unexpected charsets. This is a problem
because it can cause a misbehaving webserver to crash the client.

I don't expect this to break existing clients; returning 'null' has always
been a possibility; it's just returned in more cases.
2017-01-29 13:46:30 -05:00
jwilson
29f69277ea [maven-release-plugin] prepare for next development iteration 2016-12-01 12:53:49 -05:00