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

2616 Commits

Author SHA1 Message Date
jwilson
4fa181b3fe [maven-release-plugin] prepare release parent-3.4.2 parent-3.4.2 2016-11-03 23:21:50 -04:00
jwilson
c9144b2818 Make HTTP/2's DISCONNECT_AT_END more graceful.
Rather than immediately and violently closing the HTTP/2 stream,
we initiate the shutdown sequence for a graceful disconnect.

This fixes StreamAllocation to avoid creating new streams on
shutdown connections. That behavior is not well tested, however.
That will come by integrating dave-r12's PR:

See https://github.com/square/okhttp/pull/2889
2016-11-03 23:18:13 -04:00
jwilson
6594d973dc [maven-release-plugin] prepare for next development iteration 2016-07-10 11:10:08 -04:00
jwilson
aa69328e67 [maven-release-plugin] prepare release parent-3.4.1 parent-3.4.1 2016-07-10 11:10:00 -04:00
Jake Wharton
fed6f2253c Merge pull request #2715 from square/jwilson.0710.hpack_bugs
Fix a major bug in our HPACK encoder.
2016-07-10 10:56:41 -04:00
jwilson
ce70637e9e Fix a major bug in our HPACK encoder.
Running the HPACK regression suite shows that in some cases we may
use the wrong dynamic index after the dynamic table has been resized.

This fixes the problem and simplifies the implementation to avoid
maps with Integer values, which were difficult to reason about and
easy to get out-of-sync with the main table.
2016-07-10 10:28:13 -04:00
jwilson
56eb3ac38e Update changelog for 3.4.0. 2016-07-08 22:57:16 -04:00
jwilson
f85cae7f0d [maven-release-plugin] prepare for next development iteration 2016-07-08 22:39:32 -04:00
jwilson
ee2b9a2917 [maven-release-plugin] prepare release parent-3.4.0 parent-3.4.0 2016-07-08 22:39:28 -04:00
Jake Wharton
04fd74fe0c Merge pull request #2710 from square/jwilson.0708.okhttpclient_lifecycle
Document OkHttpClient best practices.
2016-07-08 22:26:11 -04:00
Jesse Wilson
09f409c21d Merge pull request #2708 from jrodbx/update-docs
Update Javadoc example for HttpUrl.encodedPath()
2016-07-08 22:22:27 -04:00
jwilson
9710e1f7f8 Document OkHttpClient best practices.
Closes: https://github.com/square/okhttp/issues/2636
2016-07-08 22:19:28 -04:00
John Rodriguez
a0b9308d27 Update Javadoc example 2016-07-08 03:05:53 -07:00
Jesse Wilson
e9245a26d8 Merge pull request #2703 from square/dr.0706.hpack-encoder-table-size
Add support for dynamic table size changes to HPACK Encoder.
2016-07-07 21:54:34 -04:00
Jesse Wilson
a8bed0fd17 Merge pull request #2697 from square/jwilson.0705.url_docs
More docs for HttpUrl.
2016-07-07 00:28:16 -04:00
jwilson
8688f539f1 More docs for HttpUrl.
Closes: https://github.com/square/okhttp/issues/2577
Closes: https://github.com/square/okhttp/issues/2263
2016-07-06 23:59:37 -04:00
Dave Roberge
1267cb958c Add support for dynamic table size changes to HPACK Encoder. 2016-07-06 22:02:40 -04:00
Jesse Wilson
f491389d14 Merge pull request #2702 from a-k-g/headers-multimap-use-treemap
Use TreeMap in Headers.toMultimap()
2016-07-06 10:11:43 -04:00
Aakash Goenka
0eab24c91a Use TreeMap in Headers.toMultimap() 2016-07-06 13:43:39 +01:00
Jake Wharton
2f7c3e404c Merge pull request #2695 from friederbluemle/fix-javadoc
Fix logging-interceptor Javadoc typo
2016-07-05 07:14:57 -04:00
Frieder Bluemle
f4f5ca9a8d Fix logging-interceptor Javadoc typo 2016-07-05 19:08:16 +08:00
Jesse Wilson
3d22fe1189 Merge pull request #2692 from square/jwilson.0703.dispatcher
Don't share the OkHttpClient's Dispatcher in HttpURLConnection.
2016-07-04 09:10:29 -04:00
jwilson
764c35e784 Don't share the OkHttpClient's Dispatcher in HttpURLConnection.
Any limits enforced here would be awkward because there's an application
thread blocked on the work anyway.

Closes: https://github.com/square/okhttp/issues/2667
2016-07-03 23:22:51 -04:00
Jesse Wilson
88e245e6de Merge pull request #2688 from yschimke/java9_tests
Java9 tests
2016-07-03 13:46:17 -04:00
Yuri Schimke
8fe73c05d8 java 9 tests 2016-07-03 07:03:48 -07:00
jwilson
7e773f39f9 [maven-release-plugin] prepare for next development iteration 2016-07-02 23:18:34 -04:00
jwilson
9db491924a [maven-release-plugin] prepare release parent-3.4.0-RC1 parent-3.4.0-RC1 2016-07-02 23:18:29 -04:00
Jake Wharton
738f7fa4de Merge pull request #2686 from square/jwilson.0702.cleartext
Always pass a host to NetworkSecurityPolicy.isCleartextTrafficPermitted
2016-07-02 22:58:44 -04:00
Jesse Wilson
f98ff257ce Merge pull request #2689 from square/dr.0702.hpack-decoder
Removed ability to change the HPACK decoder header table size setting.
2016-07-02 22:26:47 -04:00
Dave Roberge
ffd9dbec89 Removed ability to change the HPACK decoder header table size setting.
Previously, we exposed this method and called it when receiving the
header table size setting from a remote peer. We concluded this was not
the intent of the spec and removed that code.
2016-07-02 19:56:09 -04:00
jwilson
1f58b14bd1 Always pass a host to NetworkSecurityPolicy.isCleartextTrafficPermitted().
Previously we were misinterpretting which hosts this method applied to.
Suppose an Android app was configured to require TLS for bank.com and
not for any other address. The NetworkSecurityPolicy.isCleartextTrafficPermitted()
method would return false because cleartext traffic wasn't universally
permitted. And OkHttp would incorrectly forbid cleartext communication
to other hosts like puppies.com.

Closes: https://github.com/square/okhttp/issues/2640
2016-07-02 13:39:16 -04:00
jwilson
e49bf70157 Update changelog for OkHttp 3.4.0-RC1. 2016-07-02 13:37:08 -04:00
Jesse Wilson
ae1ef1604d Merge pull request #2685 from square/jwilson.0702.pipe
Upgrade to Okio 1.9 and use its pipe.
2016-07-02 11:00:52 -04:00
Jesse Wilson
8d51e740d7 Merge pull request #2666 from square/jwilson.0626.dead_code
Run IntelliJ's analysis on OkHttp.
2016-07-02 10:56:44 -04:00
jwilson
537df4219c Upgrade to Okio 1.9 and use its pipe. 2016-07-02 10:49:25 -04:00
Jesse Wilson
35e29d9edb Merge pull request #2684 from square/jwilson.0701.non_ascii_etag
Permit non-ASCII ETag headers.
2016-07-01 13:52:42 -04:00
jwilson
50ff1e140f Permit non-ASCII ETag headers.
These are currently being encoded in UTF-8, and the charset is not
otherwise specified, so the result is not necessarily going to
succeed at caching.

But this avoids crashing when the server returns an unexpected ETag.

Closes: https://github.com/square/okhttp/issues/2628
2016-07-01 13:42:33 -04:00
Jesse Wilson
b33714770e Merge pull request #2673 from square/dr.0627.arbitrary-hpack-decode
Do not allow remote peer to arbitrarily size the HPACK decoder dynamic table.
2016-06-30 20:59:53 -04:00
jwilson
f5099ce11f Merge branch '15characterlimi-delegate'
* 15characterlimi-delegate:
  Cleanup refactoring: Move 3 methods into DelegatingHttpsURLConnection
2016-06-28 18:22:10 -04:00
Tobias Thierer
1ef0b078a8 Cleanup refactoring: Move 3 methods into DelegatingHttpsURLConnection
These three methods were delegating to delegate; their implementation
was duplicated across both subclasses of DelegatingHttpsURLConnection.

This change moves them into the base class in order to
  - avoid duplication
  - separate the responsibility of delegation (base class) from the
    responsibility of change to behavior (subclasses).

Notes:
 - Since these three methods are not available in Java 6, each of
   these need a @IgnoreJRERequirement annotation to pass the
   animal sniffer test. This appears like it should have been
   necessary before but for some reason it used to pass without.
 - This in turn requires a new dependency from okhttp-urlconnection
   onto animal-sniffer-annotations. The dependency was added onto
   version 1.11 of that library (consistent with okhttp itself);
   okio depends on version 1.10, the latest version is 1.15.
2016-06-28 18:22:02 -04:00
Dave Roberge
a5dc3106c5 Do not allow remote peer to arbitrarily size the HPACK decoder dynamic table. 2016-06-27 20:34:44 -04:00
jwilson
a4d3082d2f Run IntelliJ's analysis on OkHttp.
This made a few hundred suggestions, many of which are thoughtful but
I'm deliberately ignoring anyway.

The following fixes are good ideas.
2016-06-27 00:47:50 -04:00
Jake Wharton
988142cfe5 Merge pull request #2665 from square/jwilson.0626.packages
Add connection, cache, and platform subpackages.
2016-06-26 23:13:22 -04:00
jwilson
c5187583bb Add connection, cache, and platform subpackages. 2016-06-26 23:04:30 -04:00
Jake Wharton
81b3a99aea Merge pull request #2664 from square/jwilson.0625.stream_allocation
Split HttpEngine into 3 interceptors.
2016-06-26 21:10:49 -04:00
jwilson
e3b3180f9c Split HttpEngine into 3 interceptors.
BridgeInterceptor does some basic header management and implements gzip
on responses.

CacheInterceptor implements HTTP response caching.

ConnectInterceptor takes the StreamAllocation that's already allocated
and uses it to create an HttpStream.
2016-06-26 10:27:34 -04:00
Jake Wharton
5c7bbf6f9e Merge pull request #2661 from square/jwilson.0625.share_test_dispatcher
Fix tests to share a common Dispatcher.
2016-06-26 00:48:06 -04:00
Jake Wharton
3e161686a8 Merge pull request #2660 from square/jwilson.0625.move_interceptors
Move core interceptors into top level classes.
2016-06-26 00:45:53 -04:00
Jesse Wilson
a73da4dfb0 Merge pull request #2659 from square/jwilson.0625.unexpected_exceptions
Fix OkHttpURLConnection to not swallow unexpected exceptions.
2016-06-25 23:22:09 -04:00
jwilson
5b8c043329 Fix tests to share a common Dispatcher.
Also fix the memory limit, which may prevent Travis from failing
our tests.
2016-06-25 21:36:38 -04:00