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

2044 Commits

Author SHA1 Message Date
Jake Wharton
dedcb5dc59 Merge pull request #1883 from marenzo/patch-1
api has changed, fixing the example
2015-09-28 15:09:46 -04:00
Michael Arenzon
16f1d04816 api has changed, fixing the example 2015-09-28 22:08:16 +03:00
Jake Wharton
18c5cad5d2 Merge pull request #1878 from square/jw/autobahn-ci
Add Autobahn infrastructure for future automated testing.
2015-09-27 18:36:41 -04:00
Jake Wharton
5b23460bbb Add Autobahn infrastructure for future automated testing. 2015-09-27 18:19:37 -04:00
Jake Wharton
8089ed1d87 Merge pull request #1881 from square/jw/unused
Remove unused field.
2015-09-27 17:30:52 -04:00
Jesse Wilson
3e618b34b9 Merge pull request #1879 from raskasa/master
Fix minor grammatical error in HttpUrlConnectionImpl's Javadoc
2015-09-27 17:26:40 -04:00
Jesse Wilson
1e16a73122 Merge pull request #1880 from square/jw/shutdown-reply-executors
Shutdown reply executors when web socket closes.
2015-09-27 17:24:28 -04:00
Jake Wharton
f04c86e143 Remove unused field. 2015-09-27 17:22:46 -04:00
Jake Wharton
b74d7a398d Shutdown reply executors when web socket closes. 2015-09-27 17:01:00 -04:00
Ras Kasa Williams
e490434c7c Fix minor grammatical error in HttpUrlConnectionImpl's Javadoc 2015-09-27 16:37:39 -04:00
Jesse Wilson
148d2d7eda Merge pull request #1877 from square/jw/moar-compliance
Honor (and thus fail on) reserved close codes defined in the spec.
2015-09-27 10:55:18 -04:00
Jake Wharton
bdd6c6f172 Close cleanly on empty close payloads, but fail on payloads of size 1. 2015-09-27 01:56:33 -04:00
Jake Wharton
db971587a4 Honor (and thus fail on) reserved close codes defined in the spec. 2015-09-27 01:38:44 -04:00
Jake Wharton
ee8a2e9f04 Merge pull request #1876 from square/jw/buffer-in-ws-writer
Introduce intermediate storage for frame contents.
2015-09-27 00:45:53 -04:00
Jake Wharton
bffee23367 Introduce intermediate storage for frame contents.
This eliminates the need to always send a frame for every FrameSink#write and to always send an empty frame for FrameSink#close. Now, we only emit bytes once Okio reports complete segments.
2015-09-27 00:37:34 -04:00
Jake Wharton
c6386cec99 Merge pull request #1875 from square/jw/body-websocket
Represent WebSocket payload using RequestBody and ResponseBody.
2015-09-26 20:18:53 -04:00
Jake Wharton
40a6dc7dd5 Represent WebSocket payload using RequestBody and ResponseBody. 2015-09-26 20:13:35 -04:00
Jake Wharton
ef4a8e661b Merge pull request #1874 from square/jw/logger
Add logging interceptor for simple request and response logging.
2015-09-26 14:07:17 -04:00
Jake Wharton
1f0cb4e6b6 Add logging interceptor for simple request and response logging. 2015-09-26 13:59:36 -04:00
Jesse Wilson
e0d9098681 Merge pull request #1868 from square/jwilson_0921_novel_test_case
Add a 3030 testcase.
2015-09-21 23:38:12 -04:00
jwilson
5a37e2c88d Add a 3030 testcase.
Crashes Chrome.
2015-09-21 23:26:35 -04:00
Jesse Wilson
313620b5f9 Merge pull request #1863 from cketti/allow_interceptor_to_change_method
Allow interceptor to change method
2015-09-18 09:51:26 -04:00
cketti
8e996aadc5 Fix bug where request body isn't sent when it should 2015-09-18 06:58:36 +02:00
cketti
bc0ca53466 Add failing test for interceptor that changes request method
When an interceptor changes the request from a method that doesn't use
a request body to a request method that requires a body, the connection
times out because no body will be sent.
2015-09-18 06:45:24 +02:00
Jesse Wilson
19455e754f Merge pull request #1858 from nfuller/FixDelegatingSSLSocketFactory
Fix DelegatingSSLSocketFactory for Android
2015-09-17 11:44:20 -04:00
Neil Fuller
84f359d025 Fix DelegatingSSLSocketFactory for Android
Commit 765a965 (pr #1835) did not modify all the necessary lines
when changing the configureSocket() method over from a
modify-in-place to a return-modified pattern. The problem
only shows up on Android where the behavior is required for
TLS_FALLBACK_SCSV tests to work.
2015-09-17 09:46:39 +01:00
Jesse Wilson
40aa83e011 Merge pull request #1855 from NightlyNexus/eric/sample
Close ResponseBody in sample
2015-09-17 00:24:18 -04:00
Eric Cochran
3f1ac2b8bc Close ResponseBody in sample 2015-09-16 17:39:41 -07:00
Jesse Wilson
4305dc3fab Merge pull request #1852 from nfuller/FixMockWebServerTestOnAndroid
Make the MockWebServer tests more Android compatible.
2015-09-15 07:24:40 -04:00
Jesse Wilson
264f3b491a Merge pull request #1851 from nfuller/FixUnknownHostException
Throw UnknownHostException not IllegalArgumentException for bad host …
2015-09-15 07:24:07 -04:00
Neil Fuller
ddc3534787 Make the MockWebServer tests more Android compatible.
There are a few cases in OkHttp where API calls don't exist on
Android, but this is one that we can work around with any loss
of understanding.

The same test also behaves differently on Android due to
differences between the OpenJDK and Android's
HttpURLConnection implementation.

See issue #1824.
2015-09-15 10:50:54 +01:00
Neil Fuller
b0664e80ed Throw UnknownHostException not IllegalArgumentException for bad host chars
Before this change HttpURLConnection would parse the bad ASCII
characters like \u0001, but fail when setting them in the host
header.

After this change HttpURLConnection throws UnknownHostException.
Earlier versions of OkHttp would escape the bad characters, but
this behavior has not been retained.

Fix for issue #1833.

This change involves a behavior change for HttpUrl, and consequently
HttpURLConnectionImpl.
2015-09-15 10:32:26 +01:00
Jesse Wilson
12550d954a Merge pull request #1849 from felipecsl/felipe/scheme-digits
Consider digits in HttpUrl scheme as valid
2015-09-13 15:41:21 -04:00
Felipe Lima
9b6cdf311a Consider digits in HttpUrl scheme as valid 2015-09-13 10:59:41 -07:00
Jesse Wilson
3d6989f367 Merge pull request #1845 from iagreen/query-param-encoding
Fix encoding set for query parameters
2015-09-09 11:26:23 -04:00
Isaac Green
597c279dfe only encode URI problem chars when actually converting to URI 2015-09-09 09:07:00 -04:00
Isaac Green
651c06fa9f Fix encoding set for query parameters 2015-09-09 01:56:15 -04:00
Jesse Wilson
f4b96d498a Merge pull request #1793 from nfuller/FixInterruption
Partially revert connection timeout behavior
2015-09-07 20:09:47 -04:00
Jesse Wilson
5dbcee9258 Merge pull request #1835 from nfuller/RefactorDelegates
Test code refactoring
2015-09-07 20:09:09 -04:00
Neil Fuller
765a9659af Test code refactoring
Modify the various Delegating*SocketFactory implementations
to return a *Socket from configureSocket() rather than assume
configuration just modifies the object supplied. Improves
flexibility and reduces the need to override multiple methods
in some places.
2015-09-02 18:11:24 +01:00
Neil Fuller
92e64f0279 Partially revert connection timeout behavior
Related to issue #1790.

If there is a *connection* timeout the next route should
be tried. Timeouts during a request/response should
probably not be retried.

The timeout/interrupt behavior was changed in PR #1257
for issue #1146. This modified both connection and
request/response behavior. The issue reported was actually
about the use of Thread.interrupt(), not timeouts, but the
behavior change modified both behavior for interrupt and
timeout.

PR #1388 split the handling of exceptions so that separate
code now handles connection errors from that which handles
request/response errors. It faithfully kept the behavior
from PR #1257.

The modification of the timeout behavior during *connection*
caused problems on Android. Now that the two types of error
handling are split it's possible to deal with them
differently and return the connection behavior to trying
the next route. This does not modify behavior during
request/response.
2015-09-02 17:59:45 +01:00
Jesse Wilson
5b60dbc06f Merge pull request #1834 from snodnipper/master
minor documentation update
2015-09-02 12:54:04 -04:00
Ollie Snowden
61fbdb04d4 minor documentation update
remove reference to deprecated method
2015-09-02 17:04:09 +01:00
Jesse Wilson
e3b52db778 Merge pull request #1829 from mgp/patch-2
Change ambiguous wording for timeouts
2015-08-29 08:09:28 -04:00
Michael Parker
1733adf99f Change ambiguous wording for timeouts
The previous wording made it sound like any connection that was ongoing
for more than 10 seconds (e.g. a download of a large file) would be
disconnected.
2015-08-28 23:31:14 -07:00
Jesse Wilson
bf09b3dca1 Merge pull request #1828 from nfuller/FixUnknownHostException
Throw UnknownHostException again from HttpURLConnection
2015-08-28 21:53:07 -04:00
Neil Fuller
067aa1f449 Throw UnknownHostException again from HttpURLConnection
This is to address issue #1827.
2015-08-28 18:09:06 +01:00
Jesse Wilson
7b77467ab7 Merge pull request #1821 from raskasa/master
Fix minor grammatical error in Javadoc for Cache.initialize().
2015-08-26 12:16:57 -04:00
Ras Kasa Williams
1529e68b87 Fix minor grammatical error in Javadoc for Cache.initialize(). 2015-08-26 10:29:54 -04:00
jwilson
aacd028938 Even more changelog for 2.5.0. 2015-08-25 23:00:20 -04:00