1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-12 10:23:16 +03:00
Commit Graph

1449 Commits

Author SHA1 Message Date
Jesse Wilson
187588cd42 Update the changelog for 2.1.0-RC1 2014-11-04 21:21:01 -05:00
Jake Wharton
cd56d89e64 Merge pull request #1124 from square/jwilson_1104_evictall
Implement DiskLruCache.evictAll and expose it in Cache.
2014-11-04 09:42:45 -08:00
Jesse Wilson
1962206a01 Implement DiskLruCache.evictAll and expose it in Cache.
Closes https://github.com/square/okhttp/issues/257
2014-11-04 10:03:56 -05:00
Jake Wharton
e3bdda06ca Merge pull request #1123 from square/jwilson_1103_import_disklrucache_tests
Import DiskLruCache tests.
2014-11-03 21:08:23 -08:00
Jesse Wilson
767051119d Import DiskLruCache tests.
See https://github.com/JakeWharton/DiskLruCache/blob/master/src/test/java/com/jakewharton/disklrucache/DiskLruCacheTest.java
2014-11-03 23:44:24 -05:00
Adrian Cole
41907c5494 Merge pull request #1120 from square/jwilson_1103_settings_tpyo
Fix a typo in settings documentation.
2014-11-03 18:58:44 -08:00
Adrian Cole
5dcc4fb76c Merge pull request #1122 from square/jwilson_1103_use_copy
Fix a concurrency bug in SPDY settings.
2014-11-03 18:57:04 -08:00
Jake Wharton
d36079a939 Merge pull request #1121 from square/jwilson_1103_routeselector
Be consistent about host names in RouteSelector.
2014-11-03 18:38:08 -08:00
Jesse Wilson
3820b5c335 Fix a concurrency bug in SPDY settings.
We were making a copy of the streams HashMap so that we could
iterate it safely after releasing our lock. But we weren't
actually using that copy when iterating. Whoops!

Fixes https://github.com/square/okhttp/issues/1119
2014-11-03 21:30:47 -05:00
Narayan Kamath
c3bc8e25c8 Be consistent about host names in RouteSelector.
Use the host specified by the address, and not URI.getHost().

bug: 18023709
Change-Id: I2c39c2ce89049130dc00047c8de6f214159144c0
2014-11-03 21:22:45 -05:00
Jesse Wilson
5f1ab03cd5 Fix a typo in settings documentation.
Closes https://github.com/square/okhttp/issues/1105
2014-11-03 20:46:25 -05:00
Adrian Cole
912d09e7da Merge pull request #1117 from square/jwilson_1102_cancel
Don't skip the callback if a call is canceled.
2014-11-02 10:06:49 -08:00
Jesse Wilson
5991ab1ecb Don't skip the callback if a call is canceled. 2014-11-02 12:48:25 -05:00
Jesse Wilson
108fd5ce51 Merge pull request #1115 from square/jwilson_1102_mws_reliability
Attempt to improve MockWebServer reliability.
2014-11-02 11:31:52 -05:00
Jesse Wilson
12f858caac Attempt to improve MockWebServer reliability.
Use the same InetAddress when binding to a port as when offering the
MockWebServer's address.

Wait for the executors to all shutdown before returning from shutdown().
2014-11-02 11:27:14 -05:00
Adrian Cole
ee56def68e Merge pull request #1116 from square/jwilson_1102_peer_close
Don't close the SPDY peer too early.
2014-11-02 08:24:05 -08:00
Jesse Wilson
b1091b3f55 Don't close the SPDY peer too early.
This was occasionally causing tests to fail because the test was
observing the connection close.
2014-11-02 10:52:52 -05:00
Jesse Wilson
6e7f14715a Merge pull request #1113 from square/jwilson_1101_not_shared
Change the cache to have non-shared semantics.
2014-11-01 11:58:35 -04:00
Jesse Wilson
112f020c41 Change the cache to have non-shared semantics.
This means we'll cache responses that use an 'Authorization' header. This
means OkHttp's cache shouldn't be used on middleboxes that sit between
user agents and the origin server; in practice this is never a use case
for OkHttp.

Fixes https://github.com/square/okhttp/issues/1035
2014-11-01 11:53:13 -04:00
Adrian Cole
20929e3f07 Merge pull request #1112 from square/jwilson_1101_cachepolicy
Fix request cache-control to match spec.
2014-11-01 08:38:44 -07:00
Jesse Wilson
ddac0083db Fix request cache-control to match spec.
Fixes https://github.com/square/okhttp/issues/1081
2014-11-01 11:07:12 -04:00
Jesse Wilson
a4c0d59ad5 Merge pull request #1102 from square/jwilson_1025_fix_cache_bug
Fix a bug where the response cache could be corrupted.
2014-10-27 14:17:49 -04:00
Jesse Wilson
f80b1f3a4a Fix a bug where the response cache could be corrupted.
When streaming a response, we copy data from our buffer to the cached file
on disk. Unfortunately we were copying N bytes from the front of the buffer
when we wanted N bytes from the back of the buffer.

Typically these are the same, but certain access patterns can cause them
to be different, corrpting the cached file on disk.

This was uncovered by migrating the cache tests from operating on
HttpURLConnection's API to our new API.
2014-10-27 11:00:01 -04:00
Jake Wharton
59b11fbabf Merge pull request #1106 from square/jwilson_1026_fix_concurrency
Don't hold the connection lock when calling receiveRstStream.
2014-10-26 13:24:20 -07:00
Jake Wharton
c079c9e985 Merge pull request #1107 from square/jwilson_1026_one_logger
Use one logger for all logging.
2014-10-26 13:14:13 -07:00
Jesse Wilson
40c2e6aec0 Use one logger for all logging.
There was a concurrency problem in CallTest where multiple calls to
Logger.getLogger() didn't return the same instance, leading to failures
in the test.
2014-10-26 11:48:53 -04:00
Jesse Wilson
8f1bc30cd1 Don't hold the connection lock when calling receiveRstStream.
Closes https://github.com/square/okhttp/issues/938
2014-10-26 10:28:45 -04:00
Jake Wharton
125df557fb Merge pull request #1104 from square/jwilson_1025_isCanceled
Add an accessor, Call.isCanceled().
2014-10-25 19:56:07 -07:00
Jesse Wilson
9cc7a5219f Add an accessor, Call.isCanceled().
Closes https://github.com/square/okhttp/issues/912
2014-10-25 22:50:10 -04:00
Jake Wharton
518b3fd0dc Merge pull request #1103 from square/jwilson_1025_log_failures
Log uncaught IOExceptions instead of rethrowing them.
2014-10-25 16:02:41 -07:00
Jesse Wilson
36cff8b864 Log uncaught IOExceptions instead of rethrowing them.
The application layer can handle these with a try/catch block in their
onResponse method if desired.

This prevents a crash for applications that haven't deliberately configured
their uncaught exception handlers.

Closes https://github.com/square/okhttp/issues/1049
2014-10-25 18:34:49 -04:00
Adrian Cole
c9cc836569 Merge pull request #1100 from square/jwilson_1023_rebuild
Don't append to a truncated line in the journal.
2014-10-24 08:02:41 -07:00
Jesse Wilson
8d4230b78d Don't append to a truncated line in the journal.
Fixes https://github.com/square/okhttp/issues/1099
2014-10-23 23:39:42 -04:00
Jesse Wilson
d173c9e908 Merge pull request #1095 from square/jw/final-headers-builder
Change Headers.Builder to be final.
2014-10-19 11:26:37 -04:00
Jake Wharton
bf47e69d3d Change Headers.Builder to be final. 2014-10-15 22:04:34 -07:00
Jesse Wilson
bc08ccc848 Merge pull request #1093 from square/adrian.hpack
Only read hpack tests for the current draft.
2014-10-14 13:31:56 -04:00
Adrian Cole
1ef2c93ec1 Only read hpack tests for the current draft. 2014-10-14 09:14:50 -07:00
Jesse Wilson
4d1ef4eb4f Merge pull request #1089 from square/jwilson_1013_connection_configuration
Introduce ConnectionConfiguration.
2014-10-13 16:50:12 -04:00
Jesse Wilson
23d5851ebd Introduce ConnectionConfiguration.
Expand the scope of TlsConfiguration to all connections, http: and https:.

Closes https://github.com/square/okhttp/issues/815
Closes https://github.com/square/okhttp/issues/1058
2014-10-13 14:17:20 -04:00
Jake Wharton
5f15e623d5 Merge pull request #1088 from square/jwilson_1012_dumb
Fix inverted condition on Route's forwarding constructor.
2014-10-12 20:35:43 -07:00
Jesse Wilson
39903819e9 Fix inverted condition on Route's forwarding constructor. 2014-10-12 23:34:44 -04:00
Jesse Wilson
3abe182b1d Merge pull request #1087 from square/jwilson_1012_tls_12
Revise how TLS connections are negotiated.
2014-10-12 23:33:12 -04:00
Jesse Wilson
c27e0fdc16 Revise how TLS connections are negotiated.
Now we explicitly enable TLSv1.2, TLSv1.1 and TLSv1.0 where they are supported.
We continue to perform only one fallback, to SSLv3.

In a follow-up we can make TLS configurations user-accessible, and allow the
application to limit which versions are used.
2014-10-12 23:23:28 -04:00
Jake Wharton
92bf318a70 Merge pull request #1086 from square/jwilson_1011_pin
Certificate pinning.
2014-10-11 20:05:30 -07:00
Jesse Wilson
83090befcc Certificate pinning. 2014-10-11 22:27:13 -04:00
Jesse Wilson
2a9abb9e35 Merge pull request #1085 from square/jwilson_1011_poolsize
Extend the keep-alive time for the SPDY push executor.
2014-10-11 14:18:26 -04:00
Jesse Wilson
712e56de25 Extend the keep-alive time for the SPDY push executor.
Closes https://github.com/square/okhttp/issues/1034
2014-10-11 10:11:44 -04:00
Jesse Wilson
9aa1268899 Merge pull request #1082 from square/jwilson_1010_cache_control
More convenient APIs for using Cache-Control in requests.
2014-10-11 09:14:20 -04:00
Jesse Wilson
a4d21865fb Merge pull request #1080 from square/jwilson_1010_http10
Forbid setProtocols with HTTP_1_0.
2014-10-11 08:59:37 -04:00
Jesse Wilson
da1d7f23ea More convenient APIs for using Cache-Control in requests. 2014-10-11 08:58:37 -04:00