1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-18 20:40:58 +03:00
Commit Graph

48 Commits

Author SHA1 Message Date
Jesse Wilson
1d86439e90 [maven-release-plugin] prepare for next development iteration 2014-12-30 21:52:35 -05:00
Jesse Wilson
6aef5ab3c5 [maven-release-plugin] prepare release parent-2.2.0 2014-12-30 21:52:33 -05:00
Jesse Wilson
050eb79163 Merge pull request #1243 from square/nfuller_ChangeAlpnNpnSupport
Nfuller change alpn npn support
2014-12-26 18:13:28 -05:00
Jesse Wilson
955934836f Merge remote-tracking branch 'nfuller/ChangeAlpnNpnSupport' into nfuller_ChangeAlpnNpnSupport
* nfuller/ChangeAlpnNpnSupport:
  Remove NPN support from OkHttp

Conflicts:
	okhttp/src/main/java/com/squareup/okhttp/Protocol.java
	pom.xml
2014-12-26 18:12:57 -05:00
Jesse Wilson
0a4e510a94 Source-incompatible: RequestBody.contentLength() throws IOException
This is a binary-compatible change, but code that currently calls
RequestBody.contentLength() doesn't necessarily catch or declare
IOException, and will need to with this change.

MultipartBuilder is most impacted by this change; previously the
length was computed eagerly; now it's not computed at all.
Applications that require the previous behavior should fully
buffer the request bodies and use that to compute the length.

Closes https://github.com/square/okhttp/issues/1141
2014-12-25 23:44:05 -05:00
Jake Wharton
15c81fdfc2 Normalize caching size in loop-local variable.
This was present in a bunch of loops, but not all and not consistently. After fixing two, I figured that I would normalize them all under the umbrella of uniformity and being lazy (only lookup up the value once if it never changes).
2014-12-24 11:33:14 -08:00
Adrian Cole
0ad37cede4 Update to h2-16, hpack-10. 2014-12-15 08:59:53 -08:00
Neil Fuller
4d068212aa Remove NPN support from OkHttp
Work in progress.

I see a new failure from a certificate pinning test but I don't
know why. Help solving this would be appreciated.

I also see failures before & after:
1) A failure from DisconnectTest
(https://github.com/square/okhttp/pull/1197 may fix that).
2) A failure from CallTest.doesNotFollow21Redirects_Async (timeout)

The maven changes should be treated with the contempt they deserve.
I mostly removed things I didn't understand and stroked maven until
it stopped squealing. The benchmarks / okcurl changes are a
particular mystery.

Tried with arbitrary versions of openjdk7 and openjdk8 I had
lying around. Behavior was the same across both (i.e. the same
failures).
2014-12-15 14:29:08 +00:00
Adrian Cole
090b2a1c2c Resurrect http/2 frame logging, 2014-12-01 23:11:14 -05:00
Jake Wharton
789b536cb3 Working towards 2.2.0. 2014-11-29 18:15:31 -08:00
Jake Wharton
eef290de39 Update to HTTP/2 Draft 15. 2014-11-23 23:27:59 -08:00
Jesse Wilson
64b607fc11 Request body buffering is not transport-specific.
Previously we were only buffering the request body when the transport
was HTTP. But we should buffer it for both SPDY and HTTP transports.

Closes https://github.com/square/okhttp/issues/1132

Also recover gracefully when retrying an empty POST body. This
is a related bug.

Closes https://github.com/square/okhttp/issues/1131
2014-11-10 21:20:51 -05:00
Jesse Wilson
ec1b266f1d [maven-release-plugin] prepare for next development iteration 2014-11-05 02:12:03 -05:00
Jesse Wilson
7b6771bb29 [maven-release-plugin] prepare release parent-2.1.0-RC1 2014-11-05 02:12:01 -05:00
Jesse Wilson
0316426ecf Bump pom versions to 2.1.0-SNAPSHOT. 2014-11-05 00:21:52 -05:00
Jesse Wilson
837dfc60bd Merge pull request #1025 from baldur/master
okcurl truncates values of headers with timestamp values
2014-10-04 18:41:31 -04:00
Adrian Cole
973cc9338a Update to h2-14 and hpack-9. 2014-09-22 11:29:40 -07:00
Baldur Gudbjornsson
b6b3d1f2fc fixes truncating of headers with timestamp values 2014-08-18 11:44:13 -04:00
Adrian Cole
1406379a33 Merge pull request #954 from square/adrian.http2draft13
Implement HTTP/2 Draft 13; HPACK Draft 08.
2014-06-22 14:56:06 -07:00
Adrian Cole
802b773994 Implement HTTP/2 Draft 13; HPACK Draft 08. 2014-06-21 21:44:12 -07:00
Jesse Wilson
f2d5fcbd40 [maven-release-plugin] prepare for next development iteration 2014-06-21 00:02:22 -04:00
Jesse Wilson
a3c18f69c9 [maven-release-plugin] prepare release parent-2.0.0 2014-06-21 00:02:19 -04:00
Jesse Wilson
2cea341be1 [maven-release-plugin] prepare for next development iteration 2014-06-11 01:36:58 -04:00
Jesse Wilson
f171096b11 [maven-release-plugin] prepare release parent-2.0.0-RC2 2014-06-11 01:34:55 -04:00
Jesse Wilson
cc92c4cecc [maven-release-plugin] prepare for next development iteration 2014-05-24 02:03:47 -04:00
Jesse Wilson
8dcc74d339 [maven-release-plugin] prepare release parent-2.0.0-RC1 2014-05-24 02:03:37 -04:00
Jesse Wilson
9fcb67db2f Rename Request.Body to RequestBody and Response.Body to ResponseBody.
Compelling alternative is ReadableBody and WritableBody, or BodySource and BodySink.
Which in theory permits reuse for serverside body makers. But I don't like those names
as much.
2014-05-10 08:26:44 -04:00
Adrian Cole
cc38140be4 Added support for http/2 draft 12, which is incompatible with previous priority schemes. 2014-05-04 11:53:15 -07:00
Adrian Cole
bdf42b20e8 Add --frames arg to okcurl, which sends HTTP/2 frame metadata to STDERR. 2014-04-26 11:15:30 -07:00
Adrian Cole
499f402d05 Merge pull request #764 from square/adrian.callfusion
Merge Job into Call. CallTest = AsyncApiTest + SyncApiTest
2014-04-25 13:00:59 -07:00
Adrian Cole
63d4dfaaa6 Merge Job into Call. CallTest = AsyncApiTest + SyncApiTest. 2014-04-25 11:13:39 -07:00
Jake Wharton
7bfcaa60e2 Use more convenience methods from Okio 0.8.0. 2014-04-25 09:23:34 -07:00
Jesse Wilson
307c7a144a Scrub StatusLine from the public API.
The status line is an unnecessary grouping of three otherwise-independent
fields: the protocol, code and message.

Combining them in the API doesn't provide much value. In SPDY and HTTP/2
these are broken apart anyway.
2014-04-19 15:28:40 -04:00
Jesse Wilson
e76f8f651d Use 'Protocol' to describe framing.
Drop setTransports/getTransports which was deprecated in favor
of protocols.

Rename setFollowProtocolRedirects to setFollowSslRedirects. I decided
to use SSL rather than TLS for consistency with nearby APIs.
2014-04-18 22:51:36 -04:00
Jesse Wilson
ab4927b857 Hide Protocol's internal byte string. 2014-04-18 20:46:54 -04:00
Jesse Wilson
9d22181146 Delete Response.Body.ready() which didn't make much sense.
Also clean up some code to use more Okio.
2014-04-18 01:05:27 -04:00
Jesse Wilson
34ab38d636 Make Source the main type in Response.Body. 2014-04-17 20:19:37 -04:00
Jesse Wilson
2dd62d46cb Merge pull request #684 from square/jwilson_0413_switch_to_okio
Switch to Okio.
2014-04-16 00:08:07 -04:00
Jesse Wilson
b242024216 Switch to Okio.
This depends on a new method, Buffer.copy() not included in Okio 0.5.
We may need to wait for an Okio 0.6 before merging this.
2014-04-15 23:59:06 -04:00
Adrian Cole and Josh Humphries and Scott Blum
1fd77e07c4 okcurl --insecure means allow any hostname. 2014-04-15 12:19:16 -04:00
Jesse Wilson
4fa4694839 Don't require OkBuffer callers to cast.
The casting masks bugs. Instead accept a long and do a range check in
OkBuffer.
2014-03-01 09:34:26 -05:00
jwilson
e7354e311c Rename OkBuffer.byteCount() to size().
Continue to use byteCount as a parameter name wherever we're
referring to the number of bytes to read or write.
2014-02-25 21:19:08 -05:00
jwilson
416e59e219 Death to ByteArrayPool.
Murdering this was the motivation of the entire Okio refactor.
2014-02-23 18:44:23 -05:00
jwilson
84184afdb2 Use Sink in HttpEngine. 2014-02-23 18:13:58 -05:00
Adrian Cole
9080b73109 Added blocking api per #405. 2014-02-22 12:32:56 -08:00
Jake Wharton
334584b834 Add body support to OkCurl. Introduce tests. 2014-02-14 09:02:08 -08:00
Adrian Cole
6587a862cf Add -X to okcurl, permitting HEAD requests. 2014-02-11 09:04:18 -08:00
Jake Wharton
acd45e124e Initial implementation of an OkHttp-backed curl clone. 2014-02-08 17:39:37 -05:00