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

55 Commits

Author SHA1 Message Date
jwilson
14eb077351 [maven-release-plugin] prepare release parent-3.2.0 2016-02-25 20:54:08 -05:00
jwilson
ac4aea6a52 [maven-release-plugin] prepare for next development iteration 2016-02-10 08:37:54 -05:00
jwilson
9aa5e87a2c [maven-release-plugin] prepare release parent-3.1.2 2016-02-10 08:37:52 -05:00
jwilson
ef1dbe1297 [maven-release-plugin] prepare for next development iteration 2016-02-07 22:10:22 -05:00
jwilson
0cd6b186b1 [maven-release-plugin] prepare release parent-3.1.1 2016-02-07 22:10:19 -05:00
jwilson
50395f9b6a [maven-release-plugin] prepare for next development iteration 2016-02-06 12:59:27 -05:00
jwilson
519ec8adca [maven-release-plugin] prepare release parent-3.1.0 2016-02-06 12:59:23 -05:00
Dave Roberge
8595234596 Handle 408 responses by retrying the request 2016-01-30 10:49:28 -05:00
jwilson
561613d579 Create request/response API tests to match some URLConnectionTest tests.
This is more work towards being able to later delete HttpURLConnectionImpl
without losing test coverage.

Also do some test cleanup.
2016-01-23 19:12:33 -05:00
jwilson
9b0706489c [maven-release-plugin] prepare for next development iteration 2016-01-14 16:03:12 -08:00
jwilson
bdbb3ad03c [maven-release-plugin] prepare release parent-3.0.1 2016-01-14 16:03:08 -08:00
jwilson
2dc79e01e1 [maven-release-plugin] prepare for next development iteration 2016-01-13 14:12:19 -08:00
jwilson
c9b812a4ab [maven-release-plugin] prepare release parent-3.0.0 2016-01-13 14:12:09 -08:00
jwilson
6d1a0b4f96 [maven-release-plugin] prepare for next development iteration 2016-01-02 02:31:17 -05:00
jwilson
ffc35dbd02 [maven-release-plugin] prepare release parent-3.0.0-RC1 2016-01-02 02:31:14 -05:00
Jake Wharton
ee83d8d26a Merge pull request #2185 from square/jwilson_0101_api_ergonomics
Detect API use errors earlier.
2016-01-02 02:13:16 -05:00
jwilson
7826bcb2fb Fix some get prefixes on Cache and ConnectionPool. 2016-01-02 02:07:30 -05:00
jwilson
d3675a5e0f Detect API use errors earlier.
Previously we would accept invalid input, but crash when that invalid input
was used.
2016-01-02 01:51:07 -05:00
jwilson
21d6303418 Restore no-args constructor for OkHttpClient.
This is a popular API and keeping it working is handy.
2016-01-01 15:22:14 -05:00
jwilson
38d570a6b2 Drop get and set prefixes in OkHttpClient, OkHttpClient.Builder 2016-01-01 12:12:35 -05:00
jwilson
f2461183e8 Refactor towards an OkHttpClient.Builder.
Still some work to do on method naming, but this was the interesting part.
Also very much need to rename OkUrlFactory in tests to urlFactory, otherwise
the client.client stuff becomes madness.
2016-01-01 10:55:32 -05:00
jwilson
32fb79996c Change CookieJar to deal with Cookies, not Headers.
There's a big consequence to this for compatible with RFC 2965 Cookies. In particular,
this drops our ability to support 'Set-Cookie2' headers, and some features used there
including quoted attributes like 'Max-Age="25"'. This is the right move for interop with
browsers, and likely to make things better for application developers, but some
people who strictly followed the RFC 2965 spec will be broken. (That spec was never
seriously adopted anywhere, which is the entire motivation of RFC 6265.)

The upside is the CookieJar interface is now much more straightforward. This is
particularly good going forward, and for clients who don't have to worry about the
strangeness of things like $Version=1 in the RFC 2965 spec.
2015-12-30 19:28:13 -05:00
jwilson
c9334bd90f New CookieJar interface.
No good first-party implementation yet.

There is an implementation in okhttp-urlconnection that delegates to the java.net
CookieHandler. That should be good enough for AOSP.
2015-12-24 14:19:37 -05:00
jwilson
98ae0fb92c Sort imports and wrap documentation at 100 columns.
This is a mechanical refactoring. The only thing I had trouble with is IntelliJ's
weak support for <ul> tags in Javadoc.
2015-12-23 19:34:28 -05:00
jwilson
9061a10ec5 Add TlsVersion to the Handshake.
This is awkward because it adds another field to the cache. I've
decided to try to keep old values in the cache working. We will
probably do a change that'll disrupt the cache later, but that
is invasive and we don't need that yet.
2015-12-21 23:02:31 -05:00
jwilson
ce3e7c40ff Change groupid to com.squareup.okhttp3. 2015-12-16 19:40:48 -05:00
jwilson
c9a89876de Rename com.squareup.okhttp to okhttp3
Maven group changes will come in follow up.
2015-12-16 01:34:59 -05:00
jwilson
f9776c4adf Drop Request.uri(). Just use Request.url().uri().
There's a mostly-academic corner case on URLs like http://host/%xx that
have a malformed escape sequence. This changes the exceptions on those
URLs from checked to unchecked.

I think we may want a separate change to HttpUrl to fix those URLs to
be encoded as http://host/%25xx which avoids the problem altogether.

Closes: https://github.com/square/okhttp/issues/2106
2015-12-15 21:31:02 -05:00
Jake Wharton
dcb3c14435 Remove IOException from source() and streams. 2015-12-15 00:05:34 -05:00
jwilson
8e4394c022 Use the cipher suite enum rather than the string. 2015-12-14 19:24:00 -05:00
Jake Wharton
93d547dcda Make HttpUrl the blessed URL method of Request. 2015-12-14 15:11:48 -05:00
jwilson
68e3fbb0a3 Fix some breaks calling obsolete APIs. 2015-12-13 22:39:30 -05:00
jwilson
b809280b16 [maven-release-plugin] prepare for next development iteration 2015-12-13 20:35:30 -05:00
jwilson
a36b1fb73c [maven-release-plugin] prepare release parent-2.7.0 2015-12-13 20:35:26 -05:00
jwilson
94ca8566b2 [maven-release-plugin] prepare for next development iteration 2015-11-22 12:30:35 -05:00
jwilson
d0a381edc1 [maven-release-plugin] prepare release parent-2.6.0 2015-11-22 12:30:31 -05:00
jwilson
8efaead13d [maven-release-plugin] prepare for next development iteration 2015-08-25 21:11:25 -04:00
jwilson
f36bed41a8 [maven-release-plugin] prepare release parent-2.5.0 2015-08-25 21:11:22 -04:00
jwilson
4c90a2e04a Use HttpUrl internally. 2015-08-02 21:01:26 -04:00
jwilson
a560f72193 Expose internal APIs for pluggable file systems.
We aren't yet ready to make FileSystem a public type, but I don't mind
making it _almost_ available via an internal API for those brave enough
to try that.

Also migrate all of our tests to use the in memory file system. It's simpler.

https://github.com/square/okhttp/issues/1459
2015-08-01 11:56:40 -07:00
Jake Wharton
8f5e344aba Fold MockWebServerRule into MockWebServer.
This avoid needing to duplicate the methods on the rule which historically was a subset of everything.

JUnit is now a required dependency.
2015-07-24 14:05:59 -04:00
jwilson
d6be7545e6 [maven-release-plugin] prepare for next development iteration 2015-05-22 19:47:49 -04:00
jwilson
7298bee253 [maven-release-plugin] prepare release parent-2.4.0 2015-05-22 19:47:47 -04:00
jwilson
a96c439a91 [maven-release-plugin] prepare for next development iteration 2015-05-16 17:03:20 -04:00
jwilson
5cc7dba3ad [maven-release-plugin] prepare release parent-2.4.0-RC1 2015-05-16 17:03:16 -04:00
Jesse Wilson
c8bd6f834d Merge pull request #1555 from nfuller/AggressiveUncaughtExceptionHandler
Install an UncaughtExceptionHandler during tests
2015-05-01 10:54:41 -04:00
Neil Fuller
b7baf23d86 Fix for issue #1589: Vary caching on Android
Keep the embedded OkHttp on Android working with Vary headers:

Vary headers were broken with android.net.http.HttpResponseCache:
the OkHttp caching requires a networkResponse to check the vary
headers and it was not being provided, leading to a
NullPointerException. Further changes were needed to actually
retain the request headers needed for the vary check itself.

Support for other stacks using the RequestCache has been
dropped for requests that include Vary headers.

To avoid regressions the existing ResponseCacheTest has been
changed to use the real cache. Previously, the use of
InMemoryResponseCache was hiding the Vary problem.

The ResponseCacheTest is now run with an AndroidShimResponseCache
to prove the tests work with real cases. The case without the shim
is covered with the CacheTest. ResponseCacheTest has been updated
to include many tests from CacheTest that were missing.

Switching the test to a real cache revealed a problem in the
JavaApiConverter and bad headers, which has been fixed by
making Headers.Builder.addLenient(String, String) accessible.
2015-04-30 16:00:28 +01:00
jwilson
1abba290f5 Never convert null into an empty request body.
This is a behavior change.
2015-04-16 19:53:13 -04:00
Neil Fuller
4e08085cc8 Install an UncaughtExceptionHandler during tests
This is to make the tests more brittle around uncaught exceptions
as they are on Android. No uncaught exceptions should escape.
2015-04-14 16:55:26 +01: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