1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-24 04:02:07 +03:00
Commit Graph

533 Commits

Author SHA1 Message Date
Jesse Wilson
04ffc0d4fc Merge pull request #347 from Ponyets/Cache-Control_separator
Support use ';' as separator of "Cache-Control"
2013-11-12 07:08:55 -08:00
panmingwei
998202c009 Support use ';' as separator of "Cache-Control" 2013-11-05 16:14:16 +08:00
Jake Wharton
19a21936ff Remove useless String.format call. 2013-11-03 20:28:59 -08:00
Jake Wharton
dcddd5eec1 Merge pull request #346 from square/jwilson/trailing_bytes
Handle name/value header blocks with trailing bytes.
2013-11-03 20:28:18 -08:00
jwilson
98c9288d8e Handle name/value header blocks with trailing bytes.
https://github.com/square/okhttp/issues/333
2013-11-03 20:58:58 -05:00
Jake Wharton
26724f25bf Merge pull request #345 from square/jwilson/case_sensitive_auth
Fix a bug where authentication was incorrectly case sensitive.
2013-11-03 11:38:36 -08:00
jwilson
f2a6a6496f Fix a bug where authentication was incorrectly case sensitive. 2013-11-03 13:58:08 -05:00
Jesse Wilson
cf03bed951 Merge pull request #343 from JonWatson/master
PATCH body/output support
2013-11-03 08:38:56 -08:00
Jon Watson
adec488f99 Allow PATCH to have body/output 2013-10-31 16:17:33 -05:00
Jesse Wilson
648eb95745 Merge pull request #339 from rupertbates/master
Change HTTP date formats from UTC to GMT to conform to section 3.3 of HT...
2013-10-27 07:14:22 -07:00
Jesse Wilson
3827afe4d2 Merge pull request #340 from square/jw/link
Use 'jar-with-dependencies' version for jar download links.
2013-10-26 19:50:30 -07:00
Jake Wharton
a4f22a2168 Use 'jar-with-dependencies' version for jar download links. 2013-10-26 13:00:22 -07:00
rbates
8161a89c8f Fix up HttpResponseCacheTest.setIfModifiedSince test to work with GMT timezone format in if-modified-since header 2013-10-24 22:02:16 +01:00
rupertbates
7679acdbde Change HTTP date formats from UTC to GMT to conform to section 3.3 of HTTP spec document RFC2616 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3)
Addresses issue https://github.com/square/okhttp/issues/337
2013-10-24 12:18:09 +01:00
Jake Wharton
d2be30b322 Merge pull request #322 from desseim/master
Fix unresolved function call on JVM < 1.7
2013-10-16 15:01:11 -07:00
Jesse Wilson
ef44b9ef89 Merge pull request #327 from everett-toews/patch-1
Added description and download info for MockWebServer.
2013-10-11 16:49:15 -07:00
Jesse Wilson
dd4c662f84 Merge pull request #325 from square/jw/hide-missed-2.0-api
Hide a 2.0 API that was left public.
2013-10-11 13:44:31 -07:00
Everett Toews
c74050b71c Added description and download info for MockWebServer. 2013-10-11 10:36:05 -04:00
Jake Wharton
cd727cd349 Hide a 2.0 API that was left public. 2013-10-10 18:23:11 -07:00
Guillaume Legrand
32a716667d Fix unresolved function call on JVM < 1.7
This notably allows the mockwebserver project to be run on Android.
ServerSocket only implements Closeable since Java 1.7 and thus calling of
closeQuietly(Closeable) with a ServerSocket argument fails when running
on Java 1.5 or 1.6 JVMs. This is the same as is already done for
closeQuietly(Socket).
2013-10-08 15:39:21 +02:00
Jesse Wilson
5538ed21d7 Merge pull request #320 from square/jwilson/idle
Fix a race condition in Connection.isExpired().
2013-09-29 19:29:59 -07:00
jwilson
29ab48bf0d Fix a race condition in Connection.isExpired().
This was causing some SPDY connections to be evicted early,
and preventing connection reuse.

The spdyConnectionReuse test becomes flaky with the
fix that makes MockWebServer use different sequenceNumbers
for different requests on the same socket. With the fix
the test is no longer flaky. The old test wasn't good enough
to detect what it wanted to detect!

This race has existed in the code since we added more
aggressive time-based expiration in January 2013. In my
basic tests the race impacted ~20% of connections on a
desktop VM. It may have been more on mobile.
2013-09-29 16:08:06 -04:00
Jesse Wilson
43a7c604c9 Merge pull request #315 from aahlenst/fix-issue-298
Bug fixed that caused gzipped responses to be returned from cache after ...
2013-09-28 12:46:11 -07:00
Jesse Wilson
d45b067b46 Merge pull request #318 from levelup/empty-map
returning null where a Map is expected is not nice
2013-09-23 11:51:34 -07:00
Steve Lhomme
2deaf1520a returning null where a Map is expected is not nice 2013-09-23 15:40:17 +02:00
Jesse Wilson
23b1216f85 Merge pull request #316 from square/jw/jarjar
Use 'jar-with-dependencies' classifier on website.
2013-09-18 19:43:27 -07:00
Jake Wharton
40d0bcbf6d Use 'jar-with-dependencies' classifier on website. 2013-09-18 16:17:44 -07:00
aahlenst
357f77221c Bug fixed that caused gzipped responses to be returned from cache after cache validation (#298). 2013-09-16 12:21:17 +02:00
Jesse Wilson
081258a266 Merge pull request #314 from square/jwilson/__sample_server
Static HTTPS/SPDY3/HTTP2 server example
2013-09-07 09:59:34 -07:00
jwilson
742cee9e41 Static HTTPS/SPDY3/HTTP2 server example 2013-09-07 11:21:14 -04:00
Jesse Wilson
943969db9b Merge pull request #312 from square/jwilson/cookiestyle
Fix checkstyle issues in new Cookie code.
2013-09-03 10:26:39 -07:00
jwilson
8f03548249 Fix checkstyle issues in new Cookie code. 2013-09-03 11:13:03 -04:00
Jesse Wilson
3a85712e7b Merge pull request #308 from romkavt/romkavt/issue-265
issue-265 Multiple HTTP Cookie: headers
2013-09-03 07:38:36 -07:00
Roman Tsirulnikov
98920e22a7 Changes by suggensions on /square/okhttp/pull/308:
1. fixed identations
2. fixed space char
3. memory allocation optimization
2013-09-03 16:54:39 +04:00
Jesse Wilson
365bfb3989 Merge pull request #309 from square/jwilson/write_http2_frames
Write some HTTP/2.0 frames
2013-09-02 10:33:03 -07:00
jwilson
8dee226c7c Write some HTTP/2.0 frames 2013-09-02 12:49:56 -04:00
Jesse Wilson
61ec053220 Merge pull request #306 from square/jwilson/headers_frames
Use one callback for SYN_STREAM, SYN_REPLY and HEADERS.
2013-09-02 09:26:31 -07:00
Jesse Wilson
47829d8a60 Merge pull request #307 from narayank/master
Upstream changes made directly to AOSP.
2013-09-02 08:57:23 -07:00
Roman Tsirulnikov
a1d42ed5bd issue-265 Multiple HTTP Cookie: headers 2013-09-02 19:25:11 +04:00
Narayan Kamath
155a516b54 Upstream changes made directly to AOSP.
This change is a combination of 4 separate commits
to fix various bugs observed during android platform
testing.

https://android-review.googlesource.com/#/c/63781/
--------------------------------------------
Allow certificate inspections after connect.

We don't have to wait for the request to be sent
before allowing inspection of SSL certs. They can be
inspected as soon as the connection is established.

Fixes CTS test UrlConnectionTest#testInspectSslAfterConnect

https://android-review.googlesource.com/#/c/63821/
---------------------------------------------
Respect read timeout on recycled connections.

Partial fix for CTS test : URLConnectionTest#testGetKeepAlive.

https://android-review.googlesource.com/#/c/63782/
-----------------------------------
Fix HttpUrlConnection#isUsingProxy.

The earlier implementation disregarded what the
ProxySelector had to say. We now query the selected
route (if one has been established).

Fixes compatibility test:
HttpURLConnectionTest#testUsingProxySelector

https://android-review.googlesource.com/#/c/63872/
--------------------------------------------
Don't support anything other than Basic auth.

We should disregard authentication schemes other than
"Basic" and let clients handle them themselves.

The java Authenticator API gives us a user name and
password combination, but we can't know how to format
that information for any scheme other than basic.

Historically:

The JB implementation responds to challenges from an
arbitrary scheme "X" by sending a header with scheme
"X" but formatted like the "Basic" scheme.

The current implementation responds to challenges from
an arbitrary scheme "X" by sending a header with scheme
"Basic" and formatter like the "Basic scheme".

Partial fix for test cases in URLConnectionTest:
- testAuthenticateWithCommaSeparatedAuthenticationMethods
- testAuthenticateWithMultipleAuthenticationHeaders
2013-09-02 14:43:30 +01:00
jwilson
a91124b6d4 Use one callback for SYN_STREAM, SYN_REPLY and HEADERS.
This is closer to the semantics of HTTP/2.0, which uses the HEADERS
frame for all three types. SPDY is a bit more strict because it
relies on redundancy; it's an error to send a SYN_REPLY after a
HEADERS frame. With HTTP/2.0, there's only one type so there's
no error to detect.
2013-09-01 13:57:20 -04:00
Jesse Wilson
dd82416bc5 Merge pull request #301 from levelup/disk-garbage
When invalid sizes are used to initialize the ArrayList
2013-08-29 08:29:31 -07:00
Steve Lhomme
18b73c180c Merge branch 'master' of https://github.com/square/okhttp into disk-garbage 2013-08-29 17:18:00 +02:00
Steve Lhomme
638ae21c7a safer check for invalid values, without catching OOM 2013-08-29 17:17:24 +02:00
Jake Wharton
3695902587 Merge pull request #302 from square/jwilson/old_bad_cache_responses
Continue to read old bad cache responses.
2013-08-28 23:18:36 -07:00
jwilson
1a824f3c64 Continue to read old bad cache responses. 2013-08-28 23:11:05 -07:00
Steve Lhomme
3b83a3ba3e When invalid sizes are used to initialize the ArrayList, don't crash with an uncaught exception 2013-08-28 17:03:58 +02:00
Jesse Wilson
eaf806a1be Merge pull request #299 from square/jwilson/hpack
Implement HPACK, HTTP header compression.
2013-08-27 07:26:38 -07:00
jwilson
5663f815af Implement HPACK, HTTP header compression. 2013-08-27 07:25:05 -07:00
Jake Wharton
6097735fde Merge pull request #297 from square/jwilson/post_to_get
Drop body headers when redirected from POST to GET.
2013-08-24 18:25:48 -07:00