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

193 Commits

Author SHA1 Message Date
jwilson
38575673e4 Optionally follow redirects from HTTPS to HTTP and vice versa.
The API is imperfect because HttpURLConnection doesn't expose
any SSL information, and because HttpsURLConnection won't necessarily
have a secure final request.
2013-02-18 04:18:53 -05:00
Jesse Wilson
6741a8f51f Merge pull request #119 from square/jwilson/style
Fix checkstyle errors
2013-02-17 13:25:27 -08:00
jwilson
6fe24773ba Fix checkstyle errors 2013-02-17 16:23:52 -05:00
Jesse Wilson
3846741dd3 Merge pull request #118 from square/marcelo/share_spdy_executors
Share thread executors in SpdyConnections
2013-02-14 13:03:39 -08:00
Marcelo Cortes
c4efcd93bb Share thread executors in SpdyConnections 2013-02-14 16:01:04 -05:00
Jesse Wilson
6b1e1b5c59 Merge pull request #117 from square/marcelo/descending_iterator
Use LinkedList.listIterator instead of LinkedList.descendingIterator() f...
2013-02-14 08:49:07 -08:00
Marcelo Cortes
b7b0299795 Use LinkedList.listIterator instead of LinkedList.descendingIterator() for API compatibility 2013-02-14 11:17:10 -05:00
Jesse Wilson
b8b2aa5d26 Merge pull request #107 from square/marcelo/empty_response_message
Handle http status message without leading space when the message is emp...
2013-02-05 11:36:57 -08:00
Marcelo Cortes
c8cd262185 Handle http status message without leading space when the message is empty 2013-02-05 14:35:30 -05:00
Marcelo Cortes
232b64658f Merge pull request #103 from square/jwilson/proxy_double_duty
Don't make the 'proxy' field do double-duty.
2013-02-02 07:08:59 -08:00
jwilson
2bcffdec4c Don't make the 'proxy' field do double-duty.
Previously it was acting as both the user's requested proxy and
also the proxy selector's selection. This breaks down, especially
since redirects permit multiple proxy selections for a single
request.
2013-02-02 09:36:13 -05:00
Jesse Wilson
456801be74 Merge pull request #102 from square/marcelo/version
increased version to 1.0
2013-02-01 12:00:11 -08:00
Marcelo Cortes
fcd40ec711 increased version to 1.0 2013-02-01 14:58:28 -05:00
Marcelo Cortes
2137b7a725 Merge pull request #101 from square/jwilson/comments
Switch to Square style for comments.
2013-02-01 08:17:40 -08:00
jwilson
7e7a3896df Switch to Square style for comments. 2013-02-01 11:13:19 -05:00
Marcelo Cortes
3e44564738 Merge pull request #100 from square/jwilson/longer_recycle_timeouts
Increase the stream drain timeout from 30ms to 100ms.
2013-02-01 08:07:17 -08:00
jwilson
c7751ee158 Increase the stream drain timeout from 30ms to 100ms.
We were missing out on opportunities to reuse HTTPS connections
with the previous timeout. This even occured on unit tests where
the latency should be very low.

https://github.com/square/okhttp/issues/90
2013-02-01 11:02:37 -05:00
Jake Wharton
2a319f7ece Merge pull request #99 from square/jwilson/transparentgzip
Merge: Strip content length in requests with "transparent" gzip handling
2013-02-01 07:14:04 -08:00
jwilson
92fcceedf5 Merge: Strip content length in requests with "transparent" gzip handling
Original AOSP/libcore commit from Brian Carlstrom:
We need to strip both the Content-Length and the Content-Encoding
for such requests. In such requests, it will be the length of the
compressed response. We hide the fact that compression is taking place
from clients, so we shouldn't give them the content length either.

Change-Id: I80713ab33143945c5e2656f478d83cc9e60226a8
2013-02-01 10:08:36 -05:00
Jake Wharton
85e70f17b7 Merge pull request #98 from square/jwilson/mecharefactor
Update checkstyle.xml and fix problems
2013-01-31 15:45:36 -08:00
jwilson
045867ef5d Update checkstyle.xml and fix problems 2013-01-31 18:37:46 -05:00
Marcelo Cortes
57cc094713 Merge pull request #96 from square/jwilson/mecharefactor
Mechanically change OkHttp to Square's Java style.
2013-01-31 14:58:07 -08:00
jwilson
2d45a13249 Mechanically change OkHttp to Square's Java style. 2013-01-31 17:36:19 -05:00
Marcelo Cortes
2d2ceffe25 Merge pull request #94 from square/marcelo/pool
Improvements to connection pool
2013-01-31 14:24:48 -08:00
Marcelo Cortes
6f6d959fda Improvements to connection pool 2013-01-31 17:23:06 -05:00
Jake Wharton
83de4eb552 Merge pull request #93 from square/jwilson/redirects
Follow up to 20 redirects.
2013-01-30 21:55:45 -08:00
jwilson
49082196be Follow up to 20 redirects. 2013-01-31 00:53:58 -05:00
Jake Wharton
4b7a40598c Merge pull request #92 from square/jwilson/ignore_racy_test
Mark a racy test with @Ignore.
2013-01-30 21:18:32 -08:00
jwilson
5bfe7124f6 Mark a racy test with @Ignore.
We've seen this fail consistently on Travis, and very rarely
on my desktop. Ignore it until it can be investigated fully.

https://github.com/square/okhttp/issues/90
2013-01-31 00:11:43 -05:00
Jake Wharton
72cdfed12d Merge pull request #91 from square/jwilson/redirect_retry
Retry if a request fails after a redirect.
2013-01-30 21:10:02 -08:00
jwilson
637783ce8a Retry if a request fails after a redirect.
https://code.google.com/p/android/issues/detail?id=41576
2013-01-31 00:05:20 -05:00
Jake Wharton
fc232eb27c Merge pull request #89 from square/jwilson/cookies
Fix cookies for SPDY transport.
2013-01-23 09:02:59 -08:00
jwilson
989652fe06 Fix cookies for SPDY transport. 2013-01-23 11:43:23 -05:00
Jake Wharton
c029803933 Merge pull request #88 from square/jwilson/more_tests
Improve SPDY+HTTP integration.
2013-01-22 13:37:12 -08:00
jwilson
194290e5f3 Improve SPDY+HTTP integration.
Writing tests shook out a few bugs:
 - Pooling wasn't working well. We were trying to connect
   after already having been connected.
 - We weren't writing response bodies to the cache.
 - We weren't capturing the request time for the cache.
 - MockSpdyServer wasn't trimming headers.

New files in this change aren't new, they're just inner classes promoted
to top-level classes for better sharing.
2013-01-22 16:14:52 -05:00
Jesse Wilson
383b49df9d Merge pull request #87 from square/jwilson/mockspdyserver
Introduce MockSpdyServer.
2013-01-22 10:39:12 -08:00
jwilson
3a0874cb22 Introduce MockSpdyServer.
This is like MockWebServer, but it speaks SPDY behind the scenes
instead of HTTP. The goal with this change is to make it very easy
to test interactions between SPDY and HTTP features like cookies,
fault tolerance and caching.
2013-01-22 13:38:38 -05:00
Jesse Wilson
514fbfd5f0 Merge pull request #86 from square/jwilson/careful
Be more careful around IOExceptions.
2013-01-21 11:42:47 -08:00
jwilson
b9580d68e9 Be more careful around IOExceptions.
This adds a first test where a frame is truncated. That has some
unpleasant consequences for the other tests because it means the
MockSpdyPeer is more aggressive about closing the socket when all
frames have been sent.

It also reduces the use of exceptions for flow control when handling
bogus incoming frames. This is a bit worse and a bit better; my
goal is to make it easier to differentiate between protocol-level
problems (bogus frames) from transport-level problems (closed sockets
and EOF streams).
2013-01-21 14:42:08 -05:00
Jake Wharton
c37a793573 Merge pull request #85 from square/jwilson/receive_window_update
Implement flow control for the outgoing stream.
2013-01-18 14:14:58 -08:00
jwilson
1bd9fefb51 Implement flow control for the outgoing stream.
We had a bug where we were using spdy/2's layout for
setting frames rather than spdy/3's layout. I discovered
this when testing flow control against Chrome.

This fixes uploads greater than 64 KiB.
2013-01-18 15:50:22 -05:00
Jake Wharton
8571b0cbd2 Merge pull request #84 from square/jwilson/send_window_update
Implement flow control for the incoming stream.
2013-01-18 11:00:49 -08:00
jwilson
b1c592d7c9 Implement flow control for the incoming stream.
This sends a WINDOW_UPDATE frame whenever the total number of
unacknowledged bytes exceeds 32 KiB. This is a simple policy;
we could tune it to be more sophisticated as necessary.

This fixes downloads of streams greater than 64 KiB.
2013-01-18 12:52:22 -05:00
Jesse Wilson
4e1dd18f07 Merge pull request #80 from square/jwilson/spdy3
Upgrade from spdy/2 to spdy/3.
2013-01-06 15:33:32 -08:00
jwilson
06579c5bfb Upgrade from spdy/2 to spdy/3. 2013-01-06 18:30:16 -05:00
edenman
34ea44bc1d Merge pull request #79 from square/jwilson/tls_modes
Turn  makeTlsTolerant into two methods.
2013-01-03 11:50:10 -08:00
jwilson
43f7cae330 Turn makeTlsTolerant into two methods.
See https://android-review.googlesource.com/48700
2013-01-03 12:37:39 -07:00
Jake Wharton
d64aef95a6 Merge pull request #78 from square/jwilson/flatten
Flatten internal packages and utility classes.
2013-01-01 20:20:33 -08:00
jwilson
689f66222b Flatten internal packages and utility classes.
The previous structure had hierarchy that was useful
for libcore but overkill for OkHttp.
2013-01-01 20:50:06 -07:00
Jake Wharton
73516e6ab1 Merge pull request #77 from square/jwilson/headers
Support the HEADERS frame.
2013-01-01 19:27:22 -08:00