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

2151 Commits

Author SHA1 Message Date
jwilson
ee87f8036f Change async cancel to cancel the raw socket only.
Previously we could close an SSL socket which does synchronous I/O. This
made it unreasonable to cancel a call on a UI thread.

Closes: https://github.com/square/okhttp/issues/1592
2015-11-29 22:58:45 -05:00
Jesse Wilson
d00778c8cf Merge pull request #2045 from square/jwilson_1127_new_connections_model
First draft of the new new stream allocations model.
2015-11-28 11:54:12 -05:00
jwilson
c358656c87 First draft of the new new stream allocations model. 2015-11-28 09:36:06 -05:00
Jake Wharton
e0d34ebdd7 Merge pull request #2043 from square/jwilson_1126_newbuilder
Test interaction of Authenticator and transparent Gzip.
2015-11-26 23:28:48 -05:00
jwilson
b566d99844 Test interaction of Authenticator and transparent Gzip. 2015-11-26 17:10:05 -05:00
jwilson
2c703b7e7e Merge "Remote DNS resolving for connections through a SOCKS proxy"
* rnauber-rnauber_remoteDNSwithSOCKS:
  Use bogus pin that doesn’t throw an exception
  Log the full URL.
  Log level getter.
  Remove synthetic protocol header from native API.
  Force logging of headers from the request body.
  Support 204 and 205 'No Content' replies when application interceptor.
  Remote DNS resolving for connections through a SOCKS proxy
2015-11-25 17:40:14 -05:00
Cédric Luthi
e31cf463ea Use bogus pin that doesn’t throw an exception
"sha1/BOGUSPIN" throws an `IllegalArgumentException` because `BOGUSPIN` is not valid base64.
2015-11-25 17:31:28 -05:00
Jake Wharton
4fdd055d17 Log the full URL. 2015-11-25 17:31:28 -05:00
Jake Wharton
1715ebeee5 Log level getter. 2015-11-25 17:31:28 -05:00
Jake Wharton
f1d5159b6b Remove synthetic protocol header from native API.
Also formalize HttpURLConnection-only 'Response-Source' synthetic header to be on par with the protocol header (which is retained for this legacy interface).
2015-11-25 17:31:28 -05:00
Jake Wharton
e745e86571 Force logging of headers from the request body. 2015-11-25 17:31:28 -05:00
Jake Wharton
e960f78ce6 Support 204 and 205 'No Content' replies when application interceptor. 2015-11-25 17:31:28 -05:00
Jesse Wilson
ed431fcdf2 Merge pull request #2042 from 0xced/fix-bogus-pin-documentation
Use bogus pin that doesn’t throw an exception
2015-11-25 14:23:11 -05:00
Cédric Luthi
b1a6ba667a Use bogus pin that doesn’t throw an exception
"sha1/BOGUSPIN" throws an `IllegalArgumentException` because `BOGUSPIN` is not valid base64.
2015-11-25 20:18:04 +01:00
Jesse Wilson
f8bb4f1420 Merge pull request #2038 from square/jw/getter
Log level getter.
2015-11-24 22:43:53 -05:00
Jesse Wilson
90f84298f0 Merge pull request #2039 from square/jw/log-full-url
Log the full URL.
2015-11-24 22:32:54 -05:00
Jake Wharton
ebb0003968 Log the full URL. 2015-11-24 22:20:41 -05:00
Jake Wharton
0fae6bbb50 Log level getter. 2015-11-24 22:14:12 -05:00
Jake Wharton
cc829c1fa9 Merge pull request #2037 from square/jw/remove-synthetic-protocol-header
Remove synthetic protocol header from native API.
2015-11-24 22:09:39 -05:00
Jake Wharton
6fff68b1e9 Remove synthetic protocol header from native API.
Also formalize HttpURLConnection-only 'Response-Source' synthetic header to be on par with the protocol header (which is retained for this legacy interface).
2015-11-24 22:03:35 -05:00
Jesse Wilson
3f2b1a469f Merge pull request #2036 from square/jw/always-log-body-headers
Force logging of headers from the request body.
2015-11-24 20:54:29 -05:00
Jake Wharton
8396d21dfa Force logging of headers from the request body. 2015-11-24 20:45:51 -05:00
Jake Wharton
810c8255fa Merge pull request #2033 from square/jw/no-content
Support 204 and 205 'No Content' replies when application interceptor.
2015-11-24 20:38:08 -05:00
Jake Wharton
b93104c9e6 Support 204 and 205 'No Content' replies when application interceptor. 2015-11-24 20:28:27 -05:00
olg
c485097476 Remote DNS resolving for connections through a SOCKS proxy
This small patch ensures that a connection through a SOCKS proxy will have its hostname resolved through the proxy as well. It includes a test case for that behaviour.
2015-11-24 23:03:16 +01:00
Jake Wharton
57d7367bba Merge pull request #2030 from square/jwilson_1023_connection_pool_tests
Write some new connection pool tests.
2015-11-23 22:22:10 -05:00
jwilson
4262a05f8e Write some new connection pool tests.
These use the Call APIs. They're high-level so they won't break with the
implementation rewrite.
2015-11-23 19:32:34 -05:00
jwilson
33dd69197e Merge branch 'framiere-patch'
* framiere-patch:
  cosmetics
2015-11-22 23:36:16 -05:00
Florent Ramière
4c491ccc10 cosmetics 2015-11-22 23:36:02 -05:00
Jesse Wilson
497f77be59 Merge pull request #2026 from artem-zinnatullin/http-logging-interceptor-setleve-null
Add null check to HttpLoggingInterceptor.setLevel()
2015-11-22 22:10:27 -05:00
Artem Zinnatullin
ee1dee1322 Add null check to HttpLoggingInterceptor.setLevel() 2015-11-23 05:35:43 +03:00
Jesse Wilson
ad02ea2280 Merge pull request #2024 from artem-zinnatullin/logging-interceptor-log-level
Return this from HttpLoggingInterceptor.setLevel()
2015-11-22 16:59:25 -05:00
Artem Zinnatullin
c664d1864b Return this from HttpLoggingInterceptor.setLevel() 2015-11-23 00:29:06 +03:00
Jake Wharton
1cb70c9efc Merge pull request #2022 from square/jwilson_1122_is_executed
Add Call.isExecuted().
2015-11-22 13:35:07 -05:00
Jesse Wilson
a4c443bddd Bump to 2.6.0 2015-11-22 12:58:44 -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 parent-2.6.0 2015-11-22 12:30:31 -05:00
jwilson
8724227ca9 Changelog for OkHttp 2.6.0. 2015-11-22 12:26:09 -05:00
jwilson
cc216c6f73 Add Call.isExecuted().
Might be useful to expose this bookkeeping to app developers.
2015-11-22 11:11:50 -05:00
Jesse Wilson
ae7c732b10 Merge pull request #2020 from square/jwilson_1121_http2_no_nulls
Fix HTTP/2 bug where we were using SPDY/3 style header concatenation.
2015-11-22 10:25:59 -05:00
jwilson
bf560c1b25 Fix HTTP/2 bug where we were using SPDY/3 style header concatenation.
When multiple headers have the same value in SPDY/3, they are concantenated
and separated by \u0000.

When multiple headers have the same value in HTTP/2, they are each written
independently.

This fixes the problem and rearranges the code to share less behavior than
previously. It gets us closer to being able to drop SPDY/3.

Closes https://github.com/square/okhttp/issues/1906
2015-11-22 10:25:50 -05:00
Jesse Wilson
85310b1f88 Merge pull request #2013 from square/jwilson_1118_less_flaky
Fix flakiness in CallTest.cancelTagImmediatelyAfterEnqueue()
2015-11-18 23:43:45 -05:00
jwilson
e36d7ecc26 Fix flakiness in CallTest.cancelTagImmediatelyAfterEnqueue()
There's a race where the HTTP engine has been created, but not yet connected
and the cancel isn't as immediate as it could be. Fix the test by making sure
there's a response to be retrieved.

With the upcoming connection pool changes we might make the implementation
more robust.

Closes: https://github.com/square/okhttp/issues/2001
2015-11-18 23:00:33 -05:00
Jesse Wilson
f2cf770162 Merge pull request #2008 from square/jwilson_1117_more_connections
Stop returning HTTP/1.0 from Connection.getProtocol().
2015-11-18 00:08:33 -05:00
jwilson
529c4a36bb Stop returning HTTP/1.0 from Connection.getProtocol().
This was updating the protocol as a side-effect of an HTTP/1.0 response.
This made the protocol field mutable, and the code more difficult to
trace.

One consequence of this change is that OkHttp will attempt HTTP/1.1 for
all requests, even if a server returns HTTP/1.0 from the first response.
This is closer to our implementation anyway.
2015-11-18 00:01:54 -05:00
Jake Wharton
3edddd1127 Merge pull request #2004 from square/jw/options-allows-body
OPTIONS allows body.
2015-11-16 14:18:19 -05:00
Jake Wharton
607f4f4322 OPTIONS allows body.
> If the OPTIONS request includes an entity-body (as indicated by the presence of Content-Length or Transfer-Encoding), then the media type MUST be indicated by a Content-Type field. Although this specification does not define any use for such a body, future extensions to HTTP might use the OPTIONS body to make more detailed queries on the server. A server that does not support such an extension MAY discard the request body.
2015-11-16 12:19:05 -05:00
Jesse Wilson
e57ba121a4 Merge pull request #1999 from square/jw/consumers-close
Force consumers to call WS#close on IO error.
2015-11-15 16:24:11 -05:00
Jake Wharton
5279518f47 Merge pull request #2000 from square/jwilson_1114_tunnel
Don't use the request to build the proxy tunnel.
2015-11-14 23:42:43 -05:00
jwilson
457fb428a7 Don't use the request to build the proxy tunnel.
The tunnel is shared between requests, and it's awkward to build that with the
first request that needs it.
2015-11-14 22:28:47 -05:00