1
0
mirror of https://github.com/square/okhttp.git synced 2025-11-27 18:21:14 +03:00
Commit Graph

142 Commits

Author SHA1 Message Date
Jesse Wilson
6a2242ce30 Import mimecraft as-is. 2014-06-09 00:53:51 -04:00
Jesse Wilson
baba1c090d Make the content type optional.
https://github.com/square/okhttp/issues/899
2014-06-08 11:29:41 -04:00
Adrian Cole
0c837a4f1c Write continuation frames when hpacked data is larger than 16383 bytes.
Change max frame size to a constant.
2014-06-04 07:47:08 -07:00
Jake Wharton
32c75ea09f Merge pull request #874 from square/jw/response-source-header
Expose backwards-compatible response source header.
2014-05-29 22:01:21 -07:00
Jake Wharton
e31b737763 Expose backwards-compatible response source header. 2014-05-29 21:58:21 -07:00
Jesse Wilson
b398a4073d Response.isSuccessful(). 2014-05-30 00:10:17 -04:00
Jesse Wilson
f6a46b8992 Don't lose uncaught exceptions. 2014-05-27 09:33:46 -04:00
Jesse Wilson
cc92c4cecc [maven-release-plugin] prepare for next development iteration 2014-05-24 02:03:47 -04:00
Jesse Wilson
8dcc74d339 [maven-release-plugin] prepare release parent-2.0.0-RC1 2014-05-24 02:03:37 -04:00
Jesse Wilson
ed70981925 Strip auth headers when redirected to another host.
These are potentially private and we don't want to leak them to another
host, regardless of whether they're created by the calling application or
by the Authenticator.
2014-05-19 23:18:07 -04:00
Jake Wharton
e40af071eb Do not deploy tests artifact. 2014-05-19 15:47:13 -07:00
Jake Wharton
53b9f84cb6 Remove Failure wrapper type. 2014-05-19 13:15:50 -07:00
Jesse Wilson
900a0d3d40 Expose Vary headers in the cache request. 2014-05-19 11:28:59 -04:00
Jake Wharton
aade32d97e Merge pull request #840 from square/jwilson_0519_no_response_source
Drop ResponseSource.
2014-05-19 08:18:44 -07:00
Jesse Wilson
22a03b59fa Drop ResponseSource. 2014-05-19 11:01:22 -04:00
Jesse Wilson
d017be5b00 Test differences between user and network responses for gzip. 2014-05-19 09:50:33 -04:00
Jesse Wilson
9abfde9e5a Network, cache and user response types.
Change the internals to handle user, network and cache requests and
responses. Expose the network and cache responses in the API, so that
clients can see which responses were cached, network, and conditionally
cached.

This is intended to replace ResponseSource.
2014-05-18 21:27:10 -04:00
Jesse Wilson
0676d8b173 Move code to the urlconnection module.
We don't need this code for the core OkHttp API.
2014-05-17 21:00:46 -04:00
Jesse Wilson
85a3e9bfc5 Merge pull request #834 from square/jwilson_0517_urlconnection
First steps at making URLConnection a shim.
2014-05-17 18:40:29 -04:00
Jesse Wilson
271cc7b632 First steps at making URLConnection a shim.
This extracts the URLConnection APIs to their own project. I still need to
go back and clean up some names in tests, add documentation, and move the
actual HttpURLConnection implementation details into this module.
2014-05-17 18:40:01 -04:00
Jesse Wilson
af08d4a3f3 Merge pull request #832 from square/jwilson_0511_authenticate_and_redirect
Add tests to show we drop authentication headers on redirect.
2014-05-17 18:38:26 -04:00
Jesse Wilson
d30c48a194 Rename redirectedBy to priorResponse.
I'm not completely in love with the name prior response, but it's better
than redirected by because it covers both redirects and authentication
challenges.
2014-05-17 13:21:26 -04:00
Jesse Wilson
2bf8aeb420 Add tests to show we drop authentication headers on redirect.
At the moment, we don't and the tests fail!
https://github.com/square/okhttp/issues/810
2014-05-17 13:10:38 -04:00
Jesse Wilson
73aaaeecae Don't rely on a fully-populated InetAddress for tests to pass. 2014-05-13 00:23:49 -04:00
Jesse Wilson
d111f4cd19 Rename OkAuthenticator to Authenticator. 2014-05-10 11:35:07 -04:00
Jesse Wilson
84312bd93f Rename Response.Callback to Callback. 2014-05-10 11:20:07 -04:00
Jesse Wilson
9fcb67db2f Rename Request.Body to RequestBody and Response.Body to ResponseBody.
Compelling alternative is ReadableBody and WritableBody, or BodySource and BodySink.
Which in theory permits reuse for serverside body makers. But I don't like those names
as much.
2014-05-10 08:26:44 -04:00
Adrian Cole
a68b85f7ef Don't coerce HTTP/2 response headers to lowercase 2014-05-07 22:36:06 -07:00
Adrian Cole
8ad79965de Fix a couple masks and remove duplication in http2 test. 2014-05-06 07:35:08 -07:00
Adrian Cole
8f49f0e014 Added missing setting for compressed data frames. 2014-05-05 22:07:32 -07:00
Jake Wharton
13ea4b1158 Merge pull request #808 from square/adrian.flake-flashlight
Add more context to SpdyConnectionTest.receiveGoAwayHttp2 so that next flake is easier to identify
2014-05-05 21:49:17 -07:00
Adrian Cole
ce424f32fa Add more context to SpdyConnectionTest.receiveGoAwayHttp2 so that next flake is easier to identify. 2014-05-05 21:19:57 -07:00
Adrian Cole
8fee1602bc fix #800: NPE on proxySelector.select 2014-05-05 20:56:07 -07:00
Jesse Wilson
ee2ed56c9a Track redirectedBy in HttpEngine.
Tracking it in Call meant we would need to duplicate code
in HttpURLConnection if we wanted the same behavior.
2014-05-05 20:41:13 -04:00
Adrian Cole
80cb022e49 fix #789: Reorder test to ensure call is canceled before its body is returned. 2014-05-04 22:33:06 -07:00
Adrian Cole
cc38140be4 Added support for http/2 draft 12, which is incompatible with previous priority schemes. 2014-05-04 11:53:15 -07:00
Adrian Cole
069dda77b1 Update to Hpack Draft 07. 2014-05-04 09:15:09 -07:00
Jesse Wilson
c536a8db8d Don't honor the default java.net.ResponseCache.
Applications using ResponseCache.setDefault() will need to use OkHttp's
cache interface instead.

We no longer support any user-defined caches.
2014-05-04 10:02:27 -04:00
Jesse Wilson
0466edb4ad Hide route database. 2014-05-04 00:31:08 -04:00
Jesse Wilson
cf17703158 Merge pull request #793 from square/jwilson_0503_copywithdefaults
Test copyWithDefaults.
2014-05-03 23:52:25 -04:00
Jesse Wilson
5ddcdf5482 Use Okio for timeouts in SPDY.
This depends on new AsyncTimeout API in Okio being released.
2014-05-03 21:05:33 -04:00
Jesse Wilson
73a0649953 Test copyWithDefaults.
Also change initialization of the default SSL factory to be a global
constant rather than a per-client constant. Otherwise two clones of
the same client won't share an SSLSocketFactory.
2014-05-03 20:58:20 -04:00
Jesse Wilson
c26f9af048 Hide ConnectionPool.recycle and share. 2014-04-30 22:02:51 -04:00
Jesse Wilson
1044d9eea2 Hide more APIs with Internal.access.
The callsite is uglier but the API is neater. I think overall
it's a small win.
2014-04-30 21:36:41 -04:00
Jesse Wilson
329750f917 Rename HttpResponseCache to Cache.
Also move OkResponseCache.java into internal.
2014-04-28 23:05:39 -04:00
Jesse Wilson
7e28b1d6b6 Change HttpResponseCache to not implement java.net.ResponseCache.
This marks some methods as @Deprecated and internal-only.
Unfortunately we don't have a great mechanism to hide them from
the documented API.
2014-04-28 21:37:51 -04:00
Adrian Cole
a5b7c3b2f3 Add ALPN support; Configure maven to use ALPN on OpenJDK 8. 2014-04-28 09:44:46 -07:00
Adrian Cole
58b71d915f Merge pull request #780 from square/jwilson_0427_rename_execute
Rename execute to enqueue for async calls.
2014-04-27 10:30:23 -07:00
Jesse Wilson
b057ad2418 Rename execute to enqueue for async calls.
I prefer 'enqueue' because we might not actually run the job
for some time (due to dispatcher's limits).
2014-04-27 12:18:52 -04:00
Adrian Cole
022173a444 Don't suggest NPN will be used when it might be ALPN. 2014-04-27 09:12:37 -07:00