1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-15 20:56:41 +03:00
Commit Graph

2918 Commits

Author SHA1 Message Date
jwilson
e56f561e93 [maven-release-plugin] prepare release parent-3.7.0 parent-3.7.0 2017-04-15 21:53:02 -04:00
Jesse Wilson
a168970380 Merge pull request #3286 from square/jwilson.0415.upgrade_okio
Upgrade to Okio 1.12.
2017-04-15 21:36:35 -04:00
jwilson
8119277581 Upgrade to Okio 1.12. 2017-04-15 21:32:54 -04:00
jwilson
dd145fbbcd Update changelog for OkHttp 3.7.0. 2017-04-15 21:24:54 -04:00
Jesse Wilson
a94f952d4f Merge pull request #3285 from square/jwilson.0415.hide_eventlistener
Hide EventListener from the public API for OkHttp 3.7.
2017-04-15 21:23:23 -04:00
Jesse Wilson
31f04d7f14 Merge pull request #3283 from square/dr.0415.public-suffix-api
Expose public suffix info via an API in HttpUrl.
2017-04-15 20:31:34 -04:00
jwilson
60b1c1d365 Hide EventListener from the public API for OkHttp 3.7.
It isn't wired up yet.
2017-04-15 20:30:04 -04:00
Jesse Wilson
82b5759d46 Merge pull request #3284 from square/jwilson.0415.fix_flaky_test
Fix WebSocketHttpTest.throwingOnMessageClosesImmediatelyAndFails().
2017-04-15 17:52:32 -04:00
Dave Roberge
379ed8a9a5 Expose public suffix info via an API in HttpUrl. 2017-04-15 17:44:20 -04:00
jwilson
ac00ca5ee4 Fix WebSocketHttpTest.throwingOnMessageClosesImmediatelyAndFails().
The server will receive an EOFException when the client errors out.
But because that didn't usually happen immediately our test got away
with confirming there were no further events.

Also fix WebSocketHttpTest.readTimeoutAppliesToHttpRequest().

Closes: https://github.com/square/okhttp/issues/3228
Closes: https://github.com/square/okhttp/issues/3090
2017-04-15 17:43:15 -04:00
Jesse Wilson
214a72f81b Merge pull request #3282 from square/jwilson.0415.invalidate_cache
Invalidate the cache even if the response has no body.
2017-04-15 16:34:20 -04:00
jwilson
c9496d350c Invalidate the cache even if the response has no body.
Closes: https://github.com/square/okhttp/issues/3203
2017-04-15 13:25:03 -04:00
Jesse Wilson
417ec22305 Merge pull request #3281 from square/jwilson.0415.not_cryptographic
Don't use a cryptographic RNG for web sockets.
2017-04-15 13:09:36 -04:00
jwilson
7dba9cae32 Don't use a cryptographic RNG for web sockets.
Some broken Android devices have problems with 'new SecureRandom()' and it's easier
to not use SecureRandom than to work-around this.

Closes: https://github.com/square/okhttp/issues/3135
2017-04-15 11:53:07 -04:00
jwilson
6ae275803d Merge branch 'mjbenedict-master'
* mjbenedict-master:
  API to specify an event listener or event listener factory
2017-04-09 21:51:22 -04:00
Michael Benedict
9eebd906ab API to specify an event listener or event listener factory 2017-04-09 21:50:41 -04:00
Jesse Wilson
a3c285fcce Merge pull request #3272 from electrum/ipv6
Fix canonicalization of IPv6 addresses in HttpUrl
2017-04-06 06:08:31 -04:00
David Phillips
e8b631bbbf Fix canonicalization of IPv6 addresses in HttpUrl
Per RFC 5952, section 4.2.2, a single 16-bit field must not be shortened.
Improper canonicalization can break TLS hostname verification because
the canonicalized name will not match the server certificate.

This change adds the examples from the RFC to the tests.
2017-04-06 00:34:39 -07:00
Jake Wharton
b5285cf91f Merge pull request #3263 from square/jwilson.0402.dont_reuse
Don't reuse connections after an unsuccessful 'Expect: 100-continue'
2017-04-02 11:31:36 -04:00
jwilson
68c854d684 Don't reuse connections after an unsuccessful 'Expect: 100-continue'
Closes https://github.com/square/okhttp/issues/3252
2017-04-02 10:06:36 -04:00
Jesse Wilson
99db430770 Merge pull request #3257 from hermanliang/hermanliang-patch-1
Update README.md
2017-04-01 10:07:52 -04:00
Herman Liang
88a2473aca Update README.md 2017-03-31 14:52:13 +08:00
Jesse Wilson
c8d1243a36 Merge pull request #3242 from square/dr.0325.no-public-suffix-cookie
Restrict cookies with a domain that is a public suffix.
2017-03-25 20:51:32 -04:00
Dave Roberge
9d51dc4858 Restrict cookies with a domain that is a public suffix.
https://github.com/square/okhttp/pull/3141
2017-03-25 19:07:27 -04:00
Jesse Wilson
613d55b37d Merge pull request #3241 from square/dr.0325.punycode-public-suffix
Change PublicSuffixDatabase to require canonical, punycode encoded domains.
2017-03-25 11:34:07 -04:00
Dave Roberge
8ac0828d5a Change PublicSuffixDatabase to require canonical, punycode encoded domains. 2017-03-25 10:37:27 -04:00
Jake Wharton
e144fd2f72 Merge pull request #3237 from square/jwilson.0322.pipe_sample
Add a sample where data is streamed via an Okio pipe.
2017-03-22 20:56:20 -07:00
jwilson
2d37490174 Add a sample where data is streamed via an Okio pipe. 2017-03-22 21:07:56 -04:00
Jesse Wilson
2fa94d3f35 Merge pull request #3232 from square/dr.0319.public-suffix-explode
Explode if the public suffix list cannot be loaded.
2017-03-19 17:22:11 -04:00
Dave Roberge
8bddb41755 Explode if the public suffix list cannot be loaded. 2017-03-19 14:17:16 -04:00
Jake Wharton
d5db9542c9 Merge pull request #3229 from grimreaper/eax/simplecon/a1/32ba7e9
Remove some some duplicate words
2017-03-19 13:47:02 -04:00
Eitan Adler
68a2264680 Remove some some duplicate words 2017-03-19 10:41:18 -07:00
Jesse Wilson
928f62a812 Merge pull request #3159 from square/dr.0212.public-suffix-fun
Introduce PublicSuffixDatabase: a list of public suffixes by publicsuffix.org.
2017-03-19 11:44:36 -04:00
Dave Roberge
0c6e851d5f Introduce PublicSuffixDatabase: a list of public suffixes by publicsuffix.org. 2017-03-18 16:47:54 -04:00
Jake Wharton
6c3a1607b0 Merge pull request #3218 from square/jwilson.0311.retain_tls_prefix
Handle either TLS_ or SSL_ prefixes for cipher suite names.
2017-03-12 00:53:00 -05:00
jwilson
e786a37642 Handle either TLS_ or SSL_ prefixes for cipher suite names.
Closes: https://github.com/square/okhttp/issues/3173
2017-03-11 22:13:45 -05:00
Jesse Wilson
87bf213119 Merge pull request #3207 from square/jwilson.0305.connection_coalescing
Connection coalescing
2017-03-10 21:56:00 -05:00
Jesse Wilson
31bc819fb5 Merge pull request #3212 from aahlenst/fix-locale-dependency
Remove locale dependency in CallTest
2017-03-07 15:21:17 -05:00
Jesse Wilson
b0a5a6626e Merge pull request #3210 from aahlenst/mws-http-url
MockWebServer: Expose request URL as HttpUrl
2017-03-07 15:20:43 -05:00
Andreas Ahlenstorf
c18b3e7237 Remove locale dependency
Fixes #3211
2017-03-07 18:55:15 +01:00
Andreas Ahlenstorf
62cab6dd2d Expose request URL as HttpUrl 2017-03-07 17:16:02 +01:00
Jesse Wilson
8eeebc1ec5 Merge pull request #3208 from chhsiao90/http2-data-frame-stream-zero
HTTP/2 reject DATA frame on streamId is zero
2017-03-07 06:38:09 -05:00
chhsiao90
e9025cb38c HTTP/2 reject DATA frame on streamId is zero 2017-03-07 11:59:39 +08:00
Yuri Schimke
81c7461c98 Connection coalescing
As described here:

https://daniel.haxx.se/blog/2016/08/18/http2-connection-coalescing/
https://hpbn.co/optimizing-application-delivery/#eliminate-domain-sharding
https://tools.ietf.org/html/rfc7540#section-9.1.1

When the following is true
- HTTP/2 so we don't overload non multiplexed connections.
- HTTPS since we need subjectAltNames (n.b. RFC 7540 defines as safe to use over plaintext, based purely on DNS).
- Desired url host is part of the subjectAltNames for an existing connection.
- One of the DNS results for desired host match the established connection.
- HostnameVerifier is *not* overridden.
- ConnectionPinner accepts the existing certificate chain.

From https://tools.ietf.org/html/rfc7540#section-9.1.1

> A server that does not wish clients to reuse connections can indicate
> that it is not authoritative for a request by sending a 421
> (Misdirected Request) status code in response to the request (see
> Section 9.1.2).
2017-03-05 20:06:58 -05:00
Jesse Wilson
e2d2ad80ff Merge pull request #3206 from square/jwilson.0305.fake_dns
Make FakeDns more capable.
2017-03-05 19:48:12 -05:00
Yuri Schimke
9e0b5b81b0 Make FakeDns more capable. 2017-03-05 16:06:02 -05:00
Jake Wharton
89621df62d Merge pull request #3161 from square/jw/2017-02-13/error-prone
Add error-prone compiler and fix its found issues.
2017-02-14 22:53:53 -05:00
Jake Wharton
1c2c57b1a9 Add error-prone compiler and fix its found issues. 2017-02-14 22:42:59 -05:00
Jesse Wilson
8ed90a0652 Merge pull request #3149 from mjbenedict/master
Strawman class for EventListener
2017-02-03 11:47:33 -05:00
Michael Benedict
518baaa6e8 add factory 2017-02-02 16:04:18 -05:00