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
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
Jake Wharton
c6ecfb825a
Merge pull request #1491 from square/jwilson_0312_cachecontrol
...
Update cache docs to use Call and CacheControl.
2015-03-12 20:52:28 -05:00
jwilson
b64901db40
Update cache docs to use Call and CacheControl.
...
Fixes https://github.com/square/okhttp/issues/1461
2015-03-12 21:47:35 -04:00
jwilson
dab882acc0
Provide context on unexpected EOFs.
...
https://github.com/square/okhttp/issues/1114
2015-03-12 21:22:20 -04:00
Jesse Wilson
a428f100a7
Merge pull request #1489 from square/jw/web-sockets
...
Move WebSocket to the public API in a sibling module.
2015-03-12 21:12:34 -04:00
Jesse Wilson
293792c5ee
Merge pull request #1488 from square/adrian.h2-final
...
Updates to http/2 final
2015-03-12 21:10:40 -04:00
Jake Wharton
0b2ef95640
Move WebSocket to the public API in a sibling module.
2015-03-11 12:24:58 -04:00
Adrian Cole
60b1dfc169
Updates to http/2 final
...
Http2 and Hpack have been [submitted]
(https://www.rfc-editor.org/queue2.html#draft-ietf-httpbis-http2 ) to the
IETF. This change removes the draft alpn identifier, and renames types
accordingly.
2015-03-11 08:18:00 -07:00
Jesse Wilson
96dfaaa817
Merge pull request #1481 from square/jw/generalize-ws-reply-executor
...
Use the now-generalized reply executor for peer close.
2015-03-10 22:15:31 -04:00
Jake Wharton
ab3f9f832b
Merge pull request #1485 from square/jwilson_0310_execute_not_submit
...
Use ExecutorService.execute, not ExecutorService.submit.
2015-03-10 21:08:36 -05:00
jwilson
f78f74f5a2
Use ExecutorService.execute, not ExecutorService.submit.
...
The latter returns a Future that we never call get() on, and
never get the exception from.
Fixes: https://github.com/square/okhttp/issues/1294
2015-03-10 22:01:23 -04:00
Jesse Wilson
dbbb6e6808
Merge pull request #1475 from square/jwilson_0308_cipher_suites_2015_03
...
Drop some RC4 cipher suites.
2015-03-09 20:38:59 -04:00
Jake Wharton
8a1e6ceec9
Use the now-generalized reply executor for peer close.
2015-03-09 20:33:47 -04:00
Jesse Wilson
c724fa4fc9
Merge pull request #1480 from square/jw/tiny-tweaks
...
Correctly determine when test code times out.
2015-03-09 10:38:32 -04:00
Jake Wharton
6b46003b74
Correctly determine when test code times out.
2015-03-09 10:06:11 -04:00
Jake Wharton
964f1b4c90
Merge pull request #1479 from square/jwilson_0308_mockwebserver_crash
...
Don't attempt to read a source after closing it.
2015-03-09 00:19:14 -04:00
jwilson
c25728dd79
Don't attempt to read a source after closing it.
...
Reported here: http://stackoverflow.com/questions/28931191/okhttp-urlconnection-test-crashes-mockwebserver-yet-passes/28934866#28934866
2015-03-08 23:45:47 -04:00
Jesse Wilson
f6baae0bcb
Merge pull request #1478 from square/jw/do-not-propagate-peer-close-exceptions
...
Exceptions from peer closing should not be propagated.
2015-03-08 23:04:11 -04:00
Jake Wharton
0a67394f2a
Exceptions from peer closing should not be propagated.
2015-03-08 22:46:25 -04:00
Jesse Wilson
8d0b2b9d3c
Merge pull request #1457 from longbai/byte-range-requestbody-create
...
request create from byte[] range
2015-03-08 21:55:51 -04:00
longbai
a8a98a0fbb
Squashed commit of the following:
...
commit 8edbfe3bfc3fd2ac86fac069bc112d8d7a5d2ffd
Author: longbai <slongbai@gmail.com >
Date: Wed Feb 25 16:54:21 2015 +0800
remove dup code
commit 9017ca5a5a2f732a56ba65fd08872b5c80ca21f3
Author: longbai <slongbai@gmail.com >
Date: Wed Feb 25 11:44:49 2015 +0800
fixed var name
commit 5b4c4553fa03422d092e9f2eb9cb5132ee58fa78
Author: longbai <slongbai@gmail.com >
Date: Wed Feb 25 11:39:55 2015 +0800
add test
commit dfab0792453cbf5807718c84f54f6e63de3678ce
Author: longbai <slongbai@gmail.com >
Date: Wed Feb 25 11:32:02 2015 +0800
request create from byte[] range
2015-03-09 09:36:58 +08:00
jwilson
2a6b4fe447
Drop some RC4 cipher suites.
...
Firefox dropped these recently. I'm following their lead.
See also:
https://docs.google.com/spreadsheets/d/1C3FdZSlCBq_-qrVwG1KDIzNIB3Hyg_rKAcgmSzOsHyQ/edit#gid=0
2015-03-08 19:52:43 -04:00
Jake Wharton
200ae1df91
Merge pull request #1474 from square/jwilson_0308_disable_alpn_android_44
...
Disable ALPN on Android 4.4.
2015-03-08 18:22:34 -04:00
jwilson
b70a1c22f9
Disable ALPN on Android 4.4.
...
We're going towards HTTP/2 only, which is ALPN and requires cipher suites
only found in Android 5+. That's where we'll focus our energy.
Tested on Android 4.4 and Android 5.0 emulators. On Android 4.4 ALPN
is avoided. On Android 5.0 it is used.
2015-03-08 17:47:39 -04:00
Jesse Wilson
f8e8f8961d
Merge pull request #1473 from square/jw/normalize-exception-messages
...
Normalize web socket exception messages to match.
2015-03-07 23:54:34 -05:00
Jake Wharton
fd162a351a
Normalize web socket exception messages to match.
2015-03-07 23:23:48 -05:00
Jesse Wilson
f152f35b8b
Merge pull request #1394 from nfuller/FixSubjectSn
...
Fix for SslContextBuilder/MockWebServer disagreeing about localhost
2015-03-07 18:17:17 -05:00
Jake Wharton
2dc180e321
Merge pull request #1472 from square/jwilson_0307_shutdown
...
Don't crash on shutdown() before start().
2015-03-07 15:26:59 -05:00
jwilson
c324114447
Don't crash on shutdown() before start().
...
Closes https://github.com/square/okhttp/issues/1372
2015-03-07 15:16:48 -05:00
Jesse Wilson
efcc2df358
Merge pull request #1469 from nashira/master
...
null out Request.Builder.url when setting urlString
2015-03-06 13:05:36 -05:00
Jake Wharton
cba15c8bc1
Merge pull request #1465 from square/jw/unsigned
...
Payload length continuations are unsigned values.
2015-03-06 03:07:46 -05:00