1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-17 08:42:25 +03:00
Commit Graph

1818 Commits

Author SHA1 Message Date
Jesse Wilson
ea8efdf59e Merge pull request #1553 from square/kiran+kenji/add-active
Expose running and queued call counts for monitoring
2015-04-14 00:44:16 -04:00
Kiran + Kenji
4f0cf03bed Expose running and queued call counts for monitoring 2015-04-13 17:20:47 -07:00
Jesse Wilson
7053d16360 Merge pull request #1388 from nfuller/CutDownAlternativeTlsFallback1
Move TLS retries / fallback into Connection.
2015-04-13 17:21:45 -04:00
Jesse Wilson
b40f99a950 Merge pull request #1548 from quinnjn/interceptor_request_not_returned_in_response
Interceptor request not returned in response
2015-04-08 13:47:06 -04:00
Quinn Neumiiller
0b3b594e9a Squashed commit of the following:
commit d5f3ef15e9822c03dc0d107a9944f730c5c8d710
Author: Quinn Neumiiller <quinnjn@gmail.com>
Date:   Tue Apr 7 16:15:51 2015 -0600

    userRequest should always be sent back, networkRequest is included in networkResponse.

commit bc7f5372b9ad9b68affef333ec259789cd342be0
Author: Quinn Neumiiller <quinnjn@gmail.com>
Date:   Mon Apr 6 20:19:27 2015 -0600

    Updating networkRequest when interceptors touch the request, attaching the request update to the userResponse.

commit ae5b3ca59f75bc068a5cab2a68465cdef9f4f5ec
Author: Quinn Neumiiller <quinnjn@gmail.com>
Date:   Mon Apr 6 18:36:38 2015 -0600

    Add a test for interceptor requests in the response
2015-04-08 08:42:21 -06:00
Jesse Wilson
4412838406 Merge pull request #1532 from square/jwilson_0325_break_mocks
Make OkHttpClient and Call final.
2015-04-02 08:40:28 -04:00
Jesse Wilson
8888dcafe6 Merge pull request #1541 from lalbuquerque/master
Adding more content and example to Dispatcher
2015-04-02 08:39:49 -04:00
Lucas Albuquerque
e6f42c4263 Adding more content and example to Dispatcher 2015-03-31 22:01:45 -03:00
jwilson
9338fa1109 Make OkHttpClient and Call final.
This will break mocks. We have a much simpler solution now, with
interceptors. Instead of mocking the HTTP client, use interceptors
to change its behavior.

Fix a bug where interceptor lists aren't independent after cloning
the OkHttpClient.
2015-03-26 00:29:19 -04:00
Jesse Wilson
76bc2d61e0 Merge pull request #1529 from nfuller/FixBadlyBehavedCache
Make badly-behaving caches cause a checked exception, not NPE
2015-03-23 14:46:17 -04:00
Neil Fuller
bb47389d85 Make badly-behaving caches cause a checked exception, not NPE
Android bug: https://code.google.com/p/android/issues/detail?id=160522
2015-03-23 15:25:21 +00:00
Jesse Wilson
fab8aa3446 Merge pull request #1527 from aried3r/ar/progress_done_fix
Pass correct boolean for `done` in Progress recipe
2015-03-22 21:30:49 -04:00
Anton Rieder
7cbb0cbdad Pass correct boolean for done 2015-03-23 02:08:30 +01:00
Jesse Wilson
ba82ecd3b5 Merge pull request #1526 from aried3r/ar/progress_recipe
Progress recipe
2015-03-22 12:37:59 -04:00
Anton Rieder
c30b6e5410 Download progress recipe 2015-03-22 17:26:40 +01:00
Jesse Wilson
762fd6f90b Merge pull request #1519 from hiddenmin/patch-1
Bump to 2.3.0
2015-03-19 19:05:55 -04:00
Amin Cheloh
cda9203445 Bump to 2.3.0 2015-03-20 05:18:49 +07:00
Neil Fuller
60f5406dcc Move TLS retries / fallback into Connection.
API changes:
1) Added: Address.getCertificatePinner()
2) Incompatible API change: Address constructor no longer
includes ConnectionSpecs. Removed getConnectionSpecs().
3) Added: ConnectionSpec.isCompatible(SSLSocket)
4) Added: TlsVersion.javaName()

Implicit / semantic / internal changes:

1) Connection now handles all attempts to connect via a route
(effectively a {proxy, socket address} pair), rather than just
one attempt. i.e. Connection now handles all the TLS negotiation
fallbacks internally.

2) Route no longer deals with TLS versions. Individual TLS
failures are not counted against a Route. If no connection
attempts to a route were successful the failure is counted
against the route.

3) The code makes a distinction between when various
IOExceptions occur, with the intention making retries a bit
smarter. It is now more obvious which exceptions happen during
setup (RequestException), connection (RouteException),
HTTP communication and thus which can be retried and whether
the request might have been sent.
2015-03-18 15:59:37 +00:00
jwilson
0237d3c3f2 [maven-release-plugin] prepare for next development iteration 2015-03-16 22:28:12 -04:00
jwilson
c49eedeba3 [maven-release-plugin] prepare release parent-2.3.0 parent-2.3.0 2015-03-16 22:28:09 -04:00
jwilson
b46e681dc8 Update changelog for 2.3.0. 2015-03-16 22:16:37 -04:00
Jake Wharton
f8183f904a Merge pull request #1510 from nfuller/FixOkioPom
Remove -SNAPSHOT from okio version
2015-03-16 11:09:10 -05:00
Neil Fuller
7f63814e91 Remove -SNAPSHOT from okio version
This seems to be required for me to build successfully.
2015-03-16 16:02:31 +00:00
Jesse Wilson
70ab5986e0 Merge pull request #1508 from square/jwilson_0315_crawler_fixes
Fix some crawler bugs.
2015-03-15 22:13:13 -04:00
jwilson
a75193b134 Fix some crawler bugs.
We were interpretting links relative to the URLs requested, rather
than the redirect targets of those URLs.
2015-03-15 22:02:37 -04:00
Jesse Wilson
71c4c8d77b Merge pull request #1506 from square/jwilson_0315_custom_trust_recipe
Custom trust recipe.
2015-03-15 21:08:10 -04:00
jwilson
2e07d308d2 Custom trust recipe.
To my great delight, Java and Android can read .pem files without
the BKS or JKS store files we typically use to distribute trusted
certificates.

This recipe includes a big copy-and-pasteable method for converting
an InputStream of PEM files into an SSLContext. The rest of it is
warnings about how dangerous that is.

Closes https://github.com/square/okhttp/issues/1336
2015-03-15 21:01:07 -04:00
Jesse Wilson
7623d34842 Merge pull request #1507 from square/jwilson_0315_okio_in_cache
Use Okio when reading cached certificates.
2015-03-15 20:12:46 -04:00
jwilson
9343be07fc Use Okio when reading cached certificates. 2015-03-15 19:05:09 -04:00
Jake Wharton
05da8aaf02 Merge pull request #1505 from square/jwilson_0315_relax_streamed_requests
Relax expectations when streamed requests fail.
2015-03-15 16:15:38 -05:00
jwilson
eaadc9e6bd Relax expectations when streamed requests fail.
We don't have machinery to recover from this when streamed requests
fail, and we also don't have machinery to reliably detect when they
will fail.

This is sad. Fortunately the new API doesn't suffer this problem.
2015-03-15 17:05:21 -04:00
Jesse Wilson
20a27d8163 Merge pull request #1503 from square/jwilson_0315_await_idle_watchdog
Fix a flaky test by waiting until the Okio watchdog is caught up.
2015-03-15 15:01:31 -04:00
Jesse Wilson
d1c002fbf4 Merge pull request #1501 from square/jwilson_0315_interceptor_throws
Add a test for interceptors throwing unchecked exceptions.
2015-03-15 14:20:03 -04:00
jwilson
7576c10e94 Fix a flaky test by waiting until the Okio watchdog is caught up.
We had tests that flake because they expected the watchdog to have
completed closing a connection, but we weren't blocking until that
work was done.

Closes https://github.com/square/okhttp/issues/1328
2015-03-15 14:16:29 -04:00
jwilson
1ab0863607 Add a test for interceptors throwing unchecked exceptions.
Our behavior here is not good. Right now it looks like we're leaking
resources; nothing is releasing the socket in a 'finally' clause when
interceptors crash. We're also not notifying the callback that the
call has failed; that's left hanging.

That said, we don't expect applications to recover from these
exceptions.

Closes https://github.com/square/okhttp/issues/1482
2015-03-15 13:45:22 -04:00
Adrian Cole
57b265b9d6 Merge pull request #1493 from square/jw/ws-call-close
Documentation that impls must call close on message payloads.
2015-03-14 21:00:17 -07:00
Adrian Cole
7c1346fb8a Merge pull request #1498 from square/jwilson_0314_bigger_frames
Introduce a buffer in SpdyStream's outgoing frames.
2015-03-14 20:54:25 -07:00
Adrian Cole
fcaa762e40 Merge pull request #1499 from square/jwilson_0314_stream_okcurl
Stream the response in okcurl.
2015-03-14 20:34:59 -07:00
Adrian Cole
548bd196de Merge pull request #1500 from square/jwilson_0314_spdyserver
Update SpdyServer.
2015-03-14 20:34:22 -07:00
jwilson
3d0fb76bd5 Update SpdyServer.
Serves HTTP/2 without problems to the latest Firefox.
2015-03-14 21:42:09 -04:00
jwilson
e90fecef86 Stream the response in okcurl.
Beneficial for this website in particular:
https://http2.golang.org/clockstream
2015-03-14 21:34:21 -04:00
jwilson
f5dc99aa49 Introduce a buffer in SpdyStream's outgoing frames.
Previously we'd consistently send 2048 byte frames because that was
Okio's default segment size. This increases OkHttp's typical segment
size to the 16 KiB frame size that all HTTP/2 endpoints support.
2015-03-14 21:20:16 -04:00
Jesse Wilson
d312d8c501 Merge pull request #1497 from square/jwilson_0314_hide_journal_write_fails
Don't get corrupted when journal writing fails.
2015-03-14 19:02:50 -04:00
jwilson
6a683da022 Don't get corrupted when journal writing fails.
Closes https://github.com/square/okhttp/issues/1211

Working towards https://github.com/square/okhttp/issues/746
2015-03-14 19:02:35 -04:00
Jake Wharton
0c2387c55e Merge pull request #1495 from square/jwilson_0314_filesystem
New file system abstraction.
2015-03-14 17:33:52 -05:00
jwilson
49e85a1fd2 New file system abstraction.
Working towards https://github.com/square/okhttp/issues/1211
2015-03-14 15:16:01 -04:00
Jake Wharton
96ba2175c0 Documentation that impls must call close on message payloads. 2015-03-13 09:43:40 -04:00
Jesse Wilson
e73a4fa5a6 Merge pull request #1492 from square/jw/missing-quote
Add missing quote.
2015-03-13 01:35:55 -04:00
Jake Wharton
db2721159e Add missing quote. 2015-03-13 00:59:51 -04:00
Jesse Wilson
95cbd9ec50 Merge pull request #1487 from square/jwilson_0310_more_context
Provide context on unexpected EOFs.
2015-03-12 21:57:47 -04:00