1
0
mirror of https://github.com/square/okhttp.git synced 2025-11-30 18:01:29 +03:00
Commit Graph

10 Commits

Author SHA1 Message Date
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
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 2015-03-16 22:28:09 -04:00
jwilson
4db679b39e Send at most one condition.
Related to https://github.com/square/okhttp/issues/831
Closes: https://github.com/square/okhttp/issues/1354
2015-01-30 17:29:57 -05:00
Neil Fuller
3a65dcd37b Fix ResponseCache handling for Android usecases
Including the code in
okhttp-android-support/src/test/java/com/squareup/okhttp/android
provides easy verification of API or behavior changes that might
affect Android.

There are some small JavaApiConverter improvements.
2015-01-14 13:43:46 +00:00
Neil Fuller
c9b0262c40 Create a new maven artifact to hold things needed for Android embedding
okhttp-android-support contains classes needed for Android embedding and
not for normal OkHttp development. The classes here can be excluded from
okhttp-urlconnection, shrinking that artifact. More classes will be
added to this component to make Android maintenance easier.
2015-01-12 10:55:17 +00:00