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
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.
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.
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
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.
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
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
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.