http 5.3.1 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +241 -41
- data/LICENSE.txt +1 -1
- data/README.md +110 -13
- data/UPGRADING.md +491 -0
- data/http.gemspec +32 -29
- data/lib/http/base64.rb +11 -1
- data/lib/http/chainable/helpers.rb +62 -0
- data/lib/http/chainable/verbs.rb +136 -0
- data/lib/http/chainable.rb +232 -136
- data/lib/http/client.rb +158 -127
- data/lib/http/connection/internals.rb +141 -0
- data/lib/http/connection.rb +126 -97
- data/lib/http/content_type.rb +61 -6
- data/lib/http/errors.rb +25 -1
- data/lib/http/feature.rb +65 -5
- data/lib/http/features/auto_deflate.rb +124 -17
- data/lib/http/features/auto_inflate.rb +38 -15
- data/lib/http/features/caching/entry.rb +178 -0
- data/lib/http/features/caching/in_memory_store.rb +63 -0
- data/lib/http/features/caching.rb +216 -0
- data/lib/http/features/digest_auth.rb +234 -0
- data/lib/http/features/instrumentation.rb +97 -17
- data/lib/http/features/logging.rb +183 -5
- data/lib/http/features/normalize_uri.rb +17 -0
- data/lib/http/features/raise_error.rb +18 -3
- data/lib/http/form_data/composite_io.rb +106 -0
- data/lib/http/form_data/file.rb +95 -0
- data/lib/http/form_data/multipart/param.rb +62 -0
- data/lib/http/form_data/multipart.rb +106 -0
- data/lib/http/form_data/part.rb +52 -0
- data/lib/http/form_data/readable.rb +58 -0
- data/lib/http/form_data/urlencoded.rb +175 -0
- data/lib/http/form_data/version.rb +8 -0
- data/lib/http/form_data.rb +102 -0
- data/lib/http/headers/known.rb +3 -0
- data/lib/http/headers/normalizer.rb +17 -36
- data/lib/http/headers.rb +172 -65
- data/lib/http/mime_type/adapter.rb +24 -9
- data/lib/http/mime_type/json.rb +19 -4
- data/lib/http/mime_type.rb +21 -3
- data/lib/http/options/definitions.rb +189 -0
- data/lib/http/options.rb +172 -125
- data/lib/http/redirector.rb +80 -75
- data/lib/http/request/body.rb +87 -6
- data/lib/http/request/builder.rb +184 -0
- data/lib/http/request/proxy.rb +83 -0
- data/lib/http/request/writer.rb +76 -16
- data/lib/http/request.rb +214 -98
- data/lib/http/response/body.rb +103 -18
- data/lib/http/response/inflater.rb +35 -7
- data/lib/http/response/parser.rb +98 -4
- data/lib/http/response/status/reasons.rb +2 -4
- data/lib/http/response/status.rb +141 -31
- data/lib/http/response.rb +219 -61
- data/lib/http/retriable/delay_calculator.rb +38 -11
- data/lib/http/retriable/errors.rb +21 -0
- data/lib/http/retriable/performer.rb +82 -38
- data/lib/http/session.rb +280 -0
- data/lib/http/timeout/global.rb +147 -34
- data/lib/http/timeout/null.rb +155 -9
- data/lib/http/timeout/per_operation.rb +139 -18
- data/lib/http/uri/normalizer.rb +82 -0
- data/lib/http/uri/parsing.rb +182 -0
- data/lib/http/uri.rb +289 -124
- data/lib/http/version.rb +2 -1
- data/lib/http.rb +11 -2
- data/sig/deps.rbs +122 -0
- data/sig/http.rbs +1619 -0
- data/test/http/base64_test.rb +28 -0
- data/test/http/client_test.rb +739 -0
- data/test/http/connection_test.rb +1533 -0
- data/test/http/content_type_test.rb +190 -0
- data/test/http/errors_test.rb +28 -0
- data/test/http/feature_test.rb +49 -0
- data/test/http/features/auto_deflate_test.rb +317 -0
- data/test/http/features/auto_inflate_test.rb +213 -0
- data/test/http/features/caching_test.rb +942 -0
- data/test/http/features/digest_auth_test.rb +996 -0
- data/test/http/features/instrumentation_test.rb +246 -0
- data/test/http/features/logging_test.rb +654 -0
- data/test/http/features/normalize_uri_test.rb +41 -0
- data/test/http/features/raise_error_test.rb +77 -0
- data/test/http/form_data/composite_io_test.rb +215 -0
- data/test/http/form_data/file_test.rb +255 -0
- data/test/http/form_data/fixtures/the-http-gem.info +1 -0
- data/test/http/form_data/multipart_test.rb +303 -0
- data/test/http/form_data/part_test.rb +90 -0
- data/test/http/form_data/urlencoded_test.rb +164 -0
- data/test/http/form_data_test.rb +232 -0
- data/test/http/headers/normalizer_test.rb +93 -0
- data/test/http/headers_test.rb +888 -0
- data/test/http/mime_type/json_test.rb +39 -0
- data/test/http/mime_type_test.rb +150 -0
- data/test/http/options/base_uri_test.rb +148 -0
- data/test/http/options/body_test.rb +21 -0
- data/test/http/options/features_test.rb +38 -0
- data/test/http/options/form_test.rb +21 -0
- data/test/http/options/headers_test.rb +32 -0
- data/test/http/options/json_test.rb +21 -0
- data/test/http/options/merge_test.rb +78 -0
- data/test/http/options/new_test.rb +37 -0
- data/test/http/options/proxy_test.rb +32 -0
- data/test/http/options_test.rb +575 -0
- data/test/http/redirector_test.rb +639 -0
- data/test/http/request/body_test.rb +318 -0
- data/test/http/request/builder_test.rb +623 -0
- data/test/http/request/writer_test.rb +391 -0
- data/test/http/request_test.rb +1733 -0
- data/test/http/response/body_test.rb +292 -0
- data/test/http/response/parser_test.rb +105 -0
- data/test/http/response/status_test.rb +322 -0
- data/test/http/response_test.rb +502 -0
- data/test/http/retriable/delay_calculator_test.rb +194 -0
- data/test/http/retriable/errors_test.rb +71 -0
- data/test/http/retriable/performer_test.rb +551 -0
- data/test/http/session_test.rb +424 -0
- data/test/http/timeout/global_test.rb +239 -0
- data/test/http/timeout/null_test.rb +218 -0
- data/test/http/timeout/per_operation_test.rb +220 -0
- data/test/http/uri/normalizer_test.rb +89 -0
- data/test/http/uri_test.rb +1140 -0
- data/test/http/version_test.rb +15 -0
- data/test/http_test.rb +818 -0
- data/test/regression_tests.rb +27 -0
- data/test/support/dummy_server/encoding_routes.rb +47 -0
- data/test/support/dummy_server/routes.rb +201 -0
- data/test/support/dummy_server/servlet.rb +81 -0
- data/test/support/dummy_server.rb +200 -0
- data/{spec → test}/support/fakeio.rb +2 -2
- data/test/support/http_handling_shared/connection_reuse_tests.rb +97 -0
- data/test/support/http_handling_shared/timeout_tests.rb +134 -0
- data/test/support/http_handling_shared.rb +11 -0
- data/test/support/proxy_server.rb +207 -0
- data/test/support/servers/runner.rb +67 -0
- data/{spec → test}/support/simplecov.rb +11 -2
- data/test/support/ssl_helper.rb +108 -0
- data/test/test_helper.rb +38 -0
- metadata +108 -168
- data/.github/workflows/ci.yml +0 -67
- data/.gitignore +0 -15
- data/.rspec +0 -1
- data/.rubocop/layout.yml +0 -8
- data/.rubocop/metrics.yml +0 -4
- data/.rubocop/rspec.yml +0 -9
- data/.rubocop/style.yml +0 -32
- data/.rubocop.yml +0 -11
- data/.rubocop_todo.yml +0 -219
- data/.yardopts +0 -2
- data/CHANGES_OLD.md +0 -1002
- data/Gemfile +0 -51
- data/Guardfile +0 -18
- data/Rakefile +0 -64
- data/lib/http/headers/mixin.rb +0 -34
- data/lib/http/retriable/client.rb +0 -37
- data/logo.png +0 -0
- data/spec/lib/http/client_spec.rb +0 -556
- data/spec/lib/http/connection_spec.rb +0 -88
- data/spec/lib/http/content_type_spec.rb +0 -47
- data/spec/lib/http/features/auto_deflate_spec.rb +0 -77
- data/spec/lib/http/features/auto_inflate_spec.rb +0 -86
- data/spec/lib/http/features/instrumentation_spec.rb +0 -81
- data/spec/lib/http/features/logging_spec.rb +0 -65
- data/spec/lib/http/features/raise_error_spec.rb +0 -62
- data/spec/lib/http/headers/mixin_spec.rb +0 -36
- data/spec/lib/http/headers/normalizer_spec.rb +0 -52
- data/spec/lib/http/headers_spec.rb +0 -527
- data/spec/lib/http/options/body_spec.rb +0 -15
- data/spec/lib/http/options/features_spec.rb +0 -33
- data/spec/lib/http/options/form_spec.rb +0 -15
- data/spec/lib/http/options/headers_spec.rb +0 -24
- data/spec/lib/http/options/json_spec.rb +0 -15
- data/spec/lib/http/options/merge_spec.rb +0 -68
- data/spec/lib/http/options/new_spec.rb +0 -30
- data/spec/lib/http/options/proxy_spec.rb +0 -20
- data/spec/lib/http/options_spec.rb +0 -13
- data/spec/lib/http/redirector_spec.rb +0 -530
- data/spec/lib/http/request/body_spec.rb +0 -211
- data/spec/lib/http/request/writer_spec.rb +0 -121
- data/spec/lib/http/request_spec.rb +0 -234
- data/spec/lib/http/response/body_spec.rb +0 -85
- data/spec/lib/http/response/parser_spec.rb +0 -74
- data/spec/lib/http/response/status_spec.rb +0 -253
- data/spec/lib/http/response_spec.rb +0 -262
- data/spec/lib/http/retriable/delay_calculator_spec.rb +0 -69
- data/spec/lib/http/retriable/performer_spec.rb +0 -302
- data/spec/lib/http/uri/normalizer_spec.rb +0 -95
- data/spec/lib/http/uri_spec.rb +0 -71
- data/spec/lib/http_spec.rb +0 -535
- data/spec/regression_specs.rb +0 -24
- data/spec/spec_helper.rb +0 -89
- data/spec/support/black_hole.rb +0 -13
- data/spec/support/dummy_server/servlet.rb +0 -203
- data/spec/support/dummy_server.rb +0 -44
- data/spec/support/fuubar.rb +0 -21
- data/spec/support/http_handling_shared.rb +0 -190
- data/spec/support/proxy_server.rb +0 -39
- data/spec/support/servers/config.rb +0 -11
- data/spec/support/servers/runner.rb +0 -19
- data/spec/support/ssl_helper.rb +0 -104
- /data/{spec → test}/support/capture_warning.rb +0 -0
data/CHANGES_OLD.md
DELETED
|
@@ -1,1002 +0,0 @@
|
|
|
1
|
-
## 5.1.1 (2022-12-17)
|
|
2
|
-
|
|
3
|
-
* [#731](https://github.com/httprb/http/pull/731)
|
|
4
|
-
Strip brackets from IPv6 addresses in `HTTP::URI`.
|
|
5
|
-
([@jeraki])
|
|
6
|
-
|
|
7
|
-
* [#722](https://github.com/httprb/http/pull/722)
|
|
8
|
-
Add `on_redirect` callback.
|
|
9
|
-
([@benubois])
|
|
10
|
-
|
|
11
|
-
## 5.1.0 (2022-06-17)
|
|
12
|
-
|
|
13
|
-
* Drop ruby-2.5 support.
|
|
14
|
-
|
|
15
|
-
* [#715](https://github.com/httprb/http/pull/715)
|
|
16
|
-
Set default encoding to UTF-8 for `application/json`.
|
|
17
|
-
([@drwl])
|
|
18
|
-
|
|
19
|
-
* [#712](https://github.com/httprb/http/pull/712)
|
|
20
|
-
Recognize cookies set by redirect.
|
|
21
|
-
([@tkellogg])
|
|
22
|
-
|
|
23
|
-
* [#707](https://github.com/httprb/http/pull/707)
|
|
24
|
-
Distinguish connection timeouts.
|
|
25
|
-
([@YuLeven])
|
|
26
|
-
|
|
27
|
-
## 5.0.4 (2021-10-07)
|
|
28
|
-
|
|
29
|
-
* [#698](https://github.com/httprb/http/pull/698)
|
|
30
|
-
Fix `HTTP::Timeout::Global#connect_ssl`.
|
|
31
|
-
([@tarcieri])
|
|
32
|
-
|
|
33
|
-
## 5.0.3 (2021-10-06)
|
|
34
|
-
|
|
35
|
-
* [#695](https://github.com/httprb/http/pull/695)
|
|
36
|
-
Revert DNS resolving feature.
|
|
37
|
-
([@PhilCoggins])
|
|
38
|
-
|
|
39
|
-
* [#694](https://github.com/httprb/http/pull/694)
|
|
40
|
-
Fix cookies extraction.
|
|
41
|
-
([@flosacca])
|
|
42
|
-
|
|
43
|
-
## 5.0.2 (2021-09-10)
|
|
44
|
-
|
|
45
|
-
* [#686](https://github.com/httprb/http/pull/686)
|
|
46
|
-
Correctly reset the parser.
|
|
47
|
-
([@bryanp])
|
|
48
|
-
|
|
49
|
-
* [#684](https://github.com/httprb/http/pull/684)
|
|
50
|
-
Don't set Content-Length for GET, HEAD, DELETE, or CONNECT requests without a BODY.
|
|
51
|
-
([@jyn514])
|
|
52
|
-
|
|
53
|
-
* [#679](https://github.com/httprb/http/pull/679)
|
|
54
|
-
Use features on redirected requests.
|
|
55
|
-
([@nomis])
|
|
56
|
-
|
|
57
|
-
* [#678](https://github.com/httprb/http/pull/678)
|
|
58
|
-
Restore `HTTP::Response` `:uri` option for backwards compatibility.
|
|
59
|
-
([@schwern])
|
|
60
|
-
|
|
61
|
-
* [#676](https://github.com/httprb/http/pull/676)
|
|
62
|
-
Update addressable because of CVE-2021-32740.
|
|
63
|
-
([@matheussilvasantos])
|
|
64
|
-
|
|
65
|
-
* [#653](https://github.com/httprb/http/pull/653)
|
|
66
|
-
Avoid force encodings on frozen strings.
|
|
67
|
-
([@bvicenzo])
|
|
68
|
-
|
|
69
|
-
* [#638](https://github.com/httprb/http/pull/638)
|
|
70
|
-
DNS failover handling.
|
|
71
|
-
([@midnight-wonderer])
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
## 5.0.1 (2021-06-26)
|
|
75
|
-
|
|
76
|
-
* [#670](https://github.com/httprb/http/pull/670)
|
|
77
|
-
Revert `Response#parse` behavior introduced in [#540].
|
|
78
|
-
([@DannyBen])
|
|
79
|
-
|
|
80
|
-
* [#669](https://github.com/httprb/http/pull/669)
|
|
81
|
-
Prevent bodies from being resubmitted when following unsafe redirects.
|
|
82
|
-
([@odinhb])
|
|
83
|
-
|
|
84
|
-
* [#664](https://github.com/httprb/http/pull/664)
|
|
85
|
-
Bump llhttp-ffi to 0.3.0.
|
|
86
|
-
([@bryanp])
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
## 5.0.0 (2021-05-12)
|
|
90
|
-
|
|
91
|
-
* [#656](https://github.com/httprb/http/pull/656)
|
|
92
|
-
Handle connection timeouts in `Features`
|
|
93
|
-
([@semenyukdmitry])
|
|
94
|
-
|
|
95
|
-
* [#651](https://github.com/httprb/http/pull/651)
|
|
96
|
-
Replace `http-parser` with `llhttp`
|
|
97
|
-
([@bryanp])
|
|
98
|
-
|
|
99
|
-
* [#647](https://github.com/httprb/http/pull/647)
|
|
100
|
-
Add support for `MKCALENDAR` HTTP verb
|
|
101
|
-
([@meanphil])
|
|
102
|
-
|
|
103
|
-
* [#632](https://github.com/httprb/http/pull/632)
|
|
104
|
-
Respect the SSL context's `verify_hostname` value
|
|
105
|
-
([@colemannugent])
|
|
106
|
-
|
|
107
|
-
* [#625](https://github.com/httprb/http/pull/625)
|
|
108
|
-
Fix inflator with empty responses
|
|
109
|
-
([@LukaszMaslej])
|
|
110
|
-
|
|
111
|
-
* [#599](https://github.com/httprb/http/pull/599)
|
|
112
|
-
Allow passing `HTTP::FormData::{Multipart,UrlEncoded}` object directly.
|
|
113
|
-
([@ixti])
|
|
114
|
-
|
|
115
|
-
* [#593](https://github.com/httprb/http/pull/593)
|
|
116
|
-
[#592](https://github.com/httprb/http/issues/592)
|
|
117
|
-
Support informational (1XX) responses.
|
|
118
|
-
([@ixti])
|
|
119
|
-
|
|
120
|
-
* [#590](https://github.com/httprb/http/pull/590)
|
|
121
|
-
[#589](https://github.com/httprb/http/issues/589)
|
|
122
|
-
Fix response headers paring.
|
|
123
|
-
([@Bonias])
|
|
124
|
-
|
|
125
|
-
* [#587](https://github.com/httprb/http/pull/587)
|
|
126
|
-
[#585](https://github.com/httprb/http/issues/585)
|
|
127
|
-
Fix redirections when server responds with multiple Location headers.
|
|
128
|
-
([@ixti])
|
|
129
|
-
|
|
130
|
-
* [#581](https://github.com/httprb/http/pull/581)
|
|
131
|
-
[#582](https://github.com/httprb/http/issues/582)
|
|
132
|
-
Add Ruby 2.7.x support.
|
|
133
|
-
([@janko])
|
|
134
|
-
|
|
135
|
-
* [#577](https://github.com/httprb/http/pull/577)
|
|
136
|
-
Fix `Chainable#timeout` with frozen Hash.
|
|
137
|
-
([@antonvolkoff])
|
|
138
|
-
|
|
139
|
-
* [#576](https://github.com/httprb/http/pull/576)
|
|
140
|
-
[#524](https://github.com/httprb/http/issues/524)
|
|
141
|
-
**BREAKING CHANGE**
|
|
142
|
-
Preserve header names casing.
|
|
143
|
-
([@joshuaflanagan])
|
|
144
|
-
|
|
145
|
-
* [#540](https://github.com/httprb/http/pull/540)
|
|
146
|
-
[#538](https://github.com/httprb/http/issues/538)
|
|
147
|
-
**BREAKING CHANGE**
|
|
148
|
-
Require explicit MIME type for Response#parse
|
|
149
|
-
([@ixti])
|
|
150
|
-
|
|
151
|
-
* [#532](https://github.com/httprb/http/pull/532)
|
|
152
|
-
Fix pipes support in request bodies.
|
|
153
|
-
([@ixti])
|
|
154
|
-
|
|
155
|
-
* [#530](https://github.com/httprb/http/pull/530)
|
|
156
|
-
Improve header fields name/value validation.
|
|
157
|
-
([@Bonias])
|
|
158
|
-
|
|
159
|
-
* [#506](https://github.com/httprb/http/pull/506)
|
|
160
|
-
[#521](https://github.com/httprb/http/issues/521)
|
|
161
|
-
Skip auto-deflate when there is no body.
|
|
162
|
-
([@Bonias])
|
|
163
|
-
|
|
164
|
-
* [#489](https://github.com/httprb/http/pull/489)
|
|
165
|
-
Fix HTTP parser.
|
|
166
|
-
([@ixti], [@fxposter])
|
|
167
|
-
|
|
168
|
-
* [#546](https://github.com/httprb/http/pull/546)
|
|
169
|
-
**BREAKING CHANGE**
|
|
170
|
-
Provide initiating `HTTP::Request` object on `HTTP::Response`.
|
|
171
|
-
([@joshuaflanagan])
|
|
172
|
-
|
|
173
|
-
* [#571](https://github.com/httprb/http/pull/571)
|
|
174
|
-
Drop Ruby 2.3.x support.
|
|
175
|
-
([@ixti])
|
|
176
|
-
|
|
177
|
-
* [3ed0c31](https://github.com/httprb/http/commit/3ed0c318eab6a8c390654cda17bf6df9e963c7d6)
|
|
178
|
-
Drop Ruby 2.4.x support.
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
## 4.4.0 (2020-03-25)
|
|
182
|
-
|
|
183
|
-
* Backport [#587](https://github.com/httprb/http/pull/587)
|
|
184
|
-
Fix redirections when server responds with multiple Location headers.
|
|
185
|
-
([@ixti])
|
|
186
|
-
|
|
187
|
-
* Backport [#599](https://github.com/httprb/http/pull/599)
|
|
188
|
-
Allow passing HTTP::FormData::{Multipart,UrlEncoded} object directly.
|
|
189
|
-
([@ixti])
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
## 4.3.0 (2020-01-09)
|
|
193
|
-
|
|
194
|
-
* Backport [#581](https://github.com/httprb/http/pull/581)
|
|
195
|
-
Add Ruby-2.7 compatibility.
|
|
196
|
-
([@ixti], [@janko])
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
## 4.2.0 (2019-10-22)
|
|
200
|
-
|
|
201
|
-
* Backport [#489](https://github.com/httprb/http/pull/489)
|
|
202
|
-
Fix HTTP parser.
|
|
203
|
-
([@ixti], [@fxposter])
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
## 4.1.1 (2019-03-12)
|
|
207
|
-
|
|
208
|
-
* Add `HTTP::Headers::ACCEPT_ENCODING` constant.
|
|
209
|
-
([@ixti])
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
## 4.1.0 (2019-03-11)
|
|
213
|
-
|
|
214
|
-
* [#533](https://github.com/httprb/http/pull/533)
|
|
215
|
-
Add URI normalizer feature that allows to swap default URI normalizer.
|
|
216
|
-
([@mamoonraja])
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
## 4.0.5 (2019-02-15)
|
|
220
|
-
|
|
221
|
-
* Backport [#532](https://github.com/httprb/http/pull/532) from master.
|
|
222
|
-
Fix pipes support in request bodies.
|
|
223
|
-
([@ixti])
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
## 4.0.4 (2019-02-12)
|
|
227
|
-
|
|
228
|
-
* Backport [#506](https://github.com/httprb/http/pull/506) from master.
|
|
229
|
-
Skip auto-deflate when there is no body.
|
|
230
|
-
([@Bonias])
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
## 4.0.3 (2019-01-18)
|
|
234
|
-
|
|
235
|
-
* Fix missing URL in response wrapped by auto inflate.
|
|
236
|
-
([@ixti])
|
|
237
|
-
|
|
238
|
-
* Provide `HTTP::Request#inspect` method for debugging purposes.
|
|
239
|
-
([@ixti])
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
## 4.0.2 (2019-01-15)
|
|
243
|
-
|
|
244
|
-
* [#506](https://github.com/httprb/http/pull/506)
|
|
245
|
-
Fix instrumentation feature.
|
|
246
|
-
([@paul])
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
## 4.0.1 (2019-01-14)
|
|
250
|
-
|
|
251
|
-
* [#515](https://github.com/httprb/http/pull/515)
|
|
252
|
-
Fix `#build_request` and `#request` to respect default options.
|
|
253
|
-
([@RickCSong])
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
## 4.0.0 (2018-10-15)
|
|
257
|
-
|
|
258
|
-
* [#482](https://github.com/httprb/http/pull/482)
|
|
259
|
-
[#499](https://github.com/httprb/http/pull/499)
|
|
260
|
-
Introduce new features injection API with 2 new feaures: instrumentation
|
|
261
|
-
(compatible with ActiveSupport::Notification) and logging.
|
|
262
|
-
([@paul])
|
|
263
|
-
|
|
264
|
-
* [#473](https://github.com/httprb/http/pull/473)
|
|
265
|
-
Handle early responses.
|
|
266
|
-
([@janko-m])
|
|
267
|
-
|
|
268
|
-
* [#468](https://github.com/httprb/http/pull/468)
|
|
269
|
-
Rewind `HTTP::Request::Body#source` once `#each` is complete.
|
|
270
|
-
([@ixti])
|
|
271
|
-
|
|
272
|
-
* [#467](https://github.com/httprb/http/pull/467)
|
|
273
|
-
Drop Ruby 2.2 support.
|
|
274
|
-
([@ixti])
|
|
275
|
-
|
|
276
|
-
* [#436](https://github.com/httprb/http/pull/436)
|
|
277
|
-
Raise ConnectionError when writing to socket fails.
|
|
278
|
-
([@janko-m])
|
|
279
|
-
|
|
280
|
-
* [#438](https://github.com/httprb/http/pull/438)
|
|
281
|
-
Expose `HTTP::Request::Body#source`.
|
|
282
|
-
([@janko-m])
|
|
283
|
-
|
|
284
|
-
* [#446](https://github.com/httprb/http/pull/446)
|
|
285
|
-
Simplify setting a timeout.
|
|
286
|
-
([@mikegee])
|
|
287
|
-
|
|
288
|
-
* [#451](https://github.com/httprb/http/pull/451)
|
|
289
|
-
Reduce memory usage when reading response body.
|
|
290
|
-
([@janko-m])
|
|
291
|
-
|
|
292
|
-
* [#458](https://github.com/httprb/http/pull/458)
|
|
293
|
-
Extract HTTP::Client#build_request method.
|
|
294
|
-
([@tycoon])
|
|
295
|
-
|
|
296
|
-
* [#462](https://github.com/httprb/http/pull/462)
|
|
297
|
-
Fix HTTP::Request#headline to allow two leading slashes in path.
|
|
298
|
-
([@scarfacedeb])
|
|
299
|
-
|
|
300
|
-
* [#454](https://github.com/httprb/http/pull/454)
|
|
301
|
-
[#464](https://github.com/httprb/http/pull/464)
|
|
302
|
-
[#384](https://github.com/httprb/http/issues/384)
|
|
303
|
-
Fix #readpartial not respecting max length argument.
|
|
304
|
-
([@janko-m], [@marshall-lee])
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
## 3.3.0 (2018-04-25)
|
|
308
|
-
|
|
309
|
-
This version backports some of the fixes and improvements made to development
|
|
310
|
-
version of the HTTP gem:
|
|
311
|
-
|
|
312
|
-
* [#458](https://github.com/httprb/http/pull/458)
|
|
313
|
-
Extract HTTP::Client#build_request method.
|
|
314
|
-
([@tycoon])
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
## 3.2.1 (2018-04-24)
|
|
318
|
-
|
|
319
|
-
* [#468](https://github.com/httprb/http/pull/468)
|
|
320
|
-
Rewind `HTTP::Request::Body#source` once `#each` is complete.
|
|
321
|
-
([@ixti])
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
## 3.2.0 (2018-04-22)
|
|
325
|
-
|
|
326
|
-
This version backports one change we missed to backport in previous release:
|
|
327
|
-
|
|
328
|
-
* Reduce memory usage when reading response body
|
|
329
|
-
([@janko-m])
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
## 3.1.0 (2018-04-22)
|
|
333
|
-
|
|
334
|
-
This version backports some of the fixes and improvements made to development
|
|
335
|
-
version of the HTTP gem:
|
|
336
|
-
|
|
337
|
-
* Fix for `#readpartial` to respect max length argument.
|
|
338
|
-
([@janko-m], [@marshall-lee])
|
|
339
|
-
|
|
340
|
-
* Fix for `HTTP::Request#headline` to allow two leading slashes in path.
|
|
341
|
-
([@scarfacedeb])
|
|
342
|
-
|
|
343
|
-
* Fix query string building for string with newlines.
|
|
344
|
-
([@mikegee])
|
|
345
|
-
|
|
346
|
-
* Deallocate temporary strings in `Response::Body#to_s`.
|
|
347
|
-
([@janko-m])
|
|
348
|
-
|
|
349
|
-
* Add `Request::Body#source`.
|
|
350
|
-
([@janko-m])
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
## 3.0.0 (2017-10-01)
|
|
354
|
-
|
|
355
|
-
* Drop support of Ruby `2.0` and Ruby `2.1`.
|
|
356
|
-
([@ixti])
|
|
357
|
-
|
|
358
|
-
* [#410](https://github.com/httprb/http/pull/410)
|
|
359
|
-
Infer `Host` header upon redirects.
|
|
360
|
-
([@janko-m])
|
|
361
|
-
|
|
362
|
-
* [#409](https://github.com/httprb/http/pull/409)
|
|
363
|
-
Enables request body streaming on any IO object.
|
|
364
|
-
([@janko-m])
|
|
365
|
-
|
|
366
|
-
* [#413](https://github.com/httprb/http/issues/413),
|
|
367
|
-
[#414](https://github.com/httprb/http/pull/414)
|
|
368
|
-
Fix encoding of body chunks.
|
|
369
|
-
([@janko-m])
|
|
370
|
-
|
|
371
|
-
* [#368](https://github.com/httprb/http/pull/368),
|
|
372
|
-
[#357](https://github.com/httprb/http/issues/357)
|
|
373
|
-
Fix timeout issue.
|
|
374
|
-
([@HoneyryderChuck])
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
## 2.2.2 (2017-04-27)
|
|
378
|
-
|
|
379
|
-
* [#404](https://github.com/httprb/http/issues/404),
|
|
380
|
-
[#405](https://github.com/httprb/http/pull/405)
|
|
381
|
-
Make keepalive timeout configurable.
|
|
382
|
-
([@nestegg])
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
## 2.2.1 (2017-02-06)
|
|
386
|
-
|
|
387
|
-
* [#395](https://github.com/httprb/http/issues/395)
|
|
388
|
-
Fix regression of API, that broke webmock integration.
|
|
389
|
-
([@ixti])
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
## 2.2.0 (2017-02-03)
|
|
393
|
-
|
|
394
|
-
* [#375](https://github.com/httprb/http/pull/375)
|
|
395
|
-
Add support for automatic Gzip/Inflate
|
|
396
|
-
([@Bonias])
|
|
397
|
-
|
|
398
|
-
* [#390](https://github.com/httprb/http/pull/390)
|
|
399
|
-
Add REPORT to the list of valid HTTP verbs
|
|
400
|
-
([@ixti])
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
## 2.1.0 (2016-11-08)
|
|
404
|
-
|
|
405
|
-
* [#370](https://github.com/httprb/http/issues/370)
|
|
406
|
-
Add Headers#include?
|
|
407
|
-
([@ixti])
|
|
408
|
-
|
|
409
|
-
* [#364](https://github.com/httprb/http/issues/364)
|
|
410
|
-
Add HTTP::Response#connection
|
|
411
|
-
([@janko-m])
|
|
412
|
-
|
|
413
|
-
* [#362](https://github.com/httprb/http/issues/362)
|
|
414
|
-
connect_ssl uses connect_timeout (Closes #359)
|
|
415
|
-
([@TiagoCardoso1983])
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
## 2.0.3 (2016-08-03)
|
|
419
|
-
|
|
420
|
-
* [#365](https://github.com/httprb/http/issues/365)
|
|
421
|
-
Add `HTTP::Response#content_length`
|
|
422
|
-
([@janko-m])
|
|
423
|
-
|
|
424
|
-
* [#335](https://github.com/httprb/http/issues/335),
|
|
425
|
-
[#360](https://github.com/httprb/http/pull/360)
|
|
426
|
-
Set `Content-Length: 0` header for `nil` bodies.
|
|
427
|
-
([@britishtea])
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
## 2.0.2 (2016-06-24)
|
|
431
|
-
|
|
432
|
-
* [#353](https://github.com/httprb/http/pull/353)
|
|
433
|
-
Avoid a dependency cycle between Client and Connection classes.
|
|
434
|
-
([@jhbabon])
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
## 2.0.1 (2016-05-12)
|
|
438
|
-
|
|
439
|
-
* [#341](https://github.com/httprb/http/pull/341)
|
|
440
|
-
Refactor some string manipulations so they are more performant
|
|
441
|
-
(up to 3-4x faster) and more concise.
|
|
442
|
-
([@tonyta])
|
|
443
|
-
|
|
444
|
-
* [#339](https://github.com/httprb/http/pull/341)
|
|
445
|
-
Always use byte methods when writing/slicing the write buffer.
|
|
446
|
-
([@zanker])
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
## 2.0.0 (2016-04-23)
|
|
450
|
-
|
|
451
|
-
* [#333](https://github.com/httprb/http/pull/333)
|
|
452
|
-
Fix HTTPS request headline when sent via proxy.
|
|
453
|
-
([@Connorhd])
|
|
454
|
-
|
|
455
|
-
* [#331](https://github.com/httprb/http/pull/331)
|
|
456
|
-
Add `#informational?`, `#success?`, `#redirect?`, `#client_error?` and
|
|
457
|
-
`#server_error?` helpers to `Response::Status`.
|
|
458
|
-
([@mwitek])
|
|
459
|
-
|
|
460
|
-
* [#330](https://github.com/httprb/http/pull/330)
|
|
461
|
-
Support custom CONNECT headers (request/response) during HTTPS proxy requests.
|
|
462
|
-
([@smudge])
|
|
463
|
-
|
|
464
|
-
* [#319](https://github.com/httprb/http/pull/319)
|
|
465
|
-
Drop Ruby 1.9.x support.
|
|
466
|
-
([@ixti])
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
## 1.0.4 (2016-03-19)
|
|
470
|
-
|
|
471
|
-
* [#320](https://github.com/httprb/http/pull/320)
|
|
472
|
-
Fix timeout regression.
|
|
473
|
-
([@tarcieri])
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
## 1.0.3 (2016-03-16)
|
|
477
|
-
|
|
478
|
-
* [#314](https://github.com/httprb/http/pull/314)
|
|
479
|
-
Validate charset before forcing encoding.
|
|
480
|
-
([@kylekyle])
|
|
481
|
-
|
|
482
|
-
* [#318](https://github.com/httprb/http/pull/318)
|
|
483
|
-
Remove redundant string allocations upon header names normalization.
|
|
484
|
-
([@ixti])
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
## 1.0.2 (2016-01-15)
|
|
488
|
-
|
|
489
|
-
* [#295](https://github.com/httprb/http/pull/295):
|
|
490
|
-
Fix redirect following when used with persistent mode.
|
|
491
|
-
([@ixti])
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
## 1.0.1 (2015-12-27)
|
|
495
|
-
|
|
496
|
-
* [#283](https://github.com/httprb/http/pull/283):
|
|
497
|
-
Use io/wait on supported platforms.
|
|
498
|
-
([@tarcieri])
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
## 1.0.0 (2015-12-25)
|
|
502
|
-
|
|
503
|
-
* [#265](https://github.com/httprb/http/pull/265/):
|
|
504
|
-
Remove deprecations ([@tarcieri]):
|
|
505
|
-
- HTTP::Chainable#with_follow (use #follow)
|
|
506
|
-
- HTTP::Chainable#with, #with_headers (use #headers)
|
|
507
|
-
- HTTP::Chainable#auth(:basic, ...) (use #basic_auth)
|
|
508
|
-
- HTTP::Chainable#default_headers (use #default_options[:headers])
|
|
509
|
-
- HTTP::Headers#append (use #add)
|
|
510
|
-
- HTTP::Options#[] hash-like API deprecated in favor of explicit methods
|
|
511
|
-
- HTTP::Request#request_header (use #headline)
|
|
512
|
-
- HTTP::Response::STATUS_CODES (use HTTP::Status::REASONS)
|
|
513
|
-
- HTTP::Response::SYMBOL_TO_STATUS_CODE (no replacement)
|
|
514
|
-
- HTTP::Response#status_code (use #status or #code)
|
|
515
|
-
- HTTP::Response::Status#symbolize (use #to_sym)
|
|
516
|
-
|
|
517
|
-
* [#269](https://github.com/httprb/http/pull/269/):
|
|
518
|
-
Close connection in case of error during request.
|
|
519
|
-
([@ixti])
|
|
520
|
-
|
|
521
|
-
* [#271](https://github.com/httprb/http/pull/271/):
|
|
522
|
-
High-level exception wrappers for low-level I/O errors.
|
|
523
|
-
([@ixti])
|
|
524
|
-
|
|
525
|
-
* [#273](https://github.com/httprb/http/pull/273/):
|
|
526
|
-
Add encoding option.
|
|
527
|
-
([@connorhd])
|
|
528
|
-
|
|
529
|
-
* [#275](https://github.com/httprb/http/pull/275/):
|
|
530
|
-
Support for disabling Nagle's algorithm with `HTTP.nodelay`.
|
|
531
|
-
([@nerdrew])
|
|
532
|
-
|
|
533
|
-
* [#276](https://github.com/httprb/http/pull/276)
|
|
534
|
-
Use Encoding::BINARY as the default encoding for HTTP::Response::Body.
|
|
535
|
-
([@tarcieri])
|
|
536
|
-
|
|
537
|
-
* [#278](https://github.com/httprb/http/pull/278)
|
|
538
|
-
Use an options hash for HTTP::Request initializer API.
|
|
539
|
-
([@ixti])
|
|
540
|
-
|
|
541
|
-
* [#279](https://github.com/httprb/http/pull/279)
|
|
542
|
-
Send headers and body in one write if possible.
|
|
543
|
-
This avoids a pathological case in Nagle's algorithm.
|
|
544
|
-
([@tarcieri])
|
|
545
|
-
|
|
546
|
-
* [#281](https://github.com/httprb/http/pull/281)
|
|
547
|
-
Remove legacy 'Http' constant alias to 'HTTP'.
|
|
548
|
-
([@tarcieri])
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
## 0.9.9 (2016-03-16)
|
|
552
|
-
|
|
553
|
-
* *BACKPORT* [#318](https://github.com/httprb/http/pull/318)
|
|
554
|
-
Remove redundant string allocations upon header names normalization.
|
|
555
|
-
([@ixti])
|
|
556
|
-
|
|
557
|
-
* *BACKPORT* [#295](https://github.com/httprb/http/pull/295):
|
|
558
|
-
Fix redirect following when used with persistent mode.
|
|
559
|
-
([@ixti])
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
## 0.9.8 (2015-09-29)
|
|
563
|
-
|
|
564
|
-
* [#260](https://github.com/httprb/http/pull/260):
|
|
565
|
-
Fixed global timeout persisting time left across requests when reusing connections.
|
|
566
|
-
([@zanker])
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
## 0.9.7 (2015-09-19)
|
|
570
|
-
|
|
571
|
-
* [#258](https://github.com/httprb/http/pull/258):
|
|
572
|
-
Unified strategy for handling exception-based and exceptionless non-blocking
|
|
573
|
-
I/O. Fixes SSL support on JRuby 9000. ([@tarcieri])
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
## 0.9.6 (2015-09-06)
|
|
577
|
-
|
|
578
|
-
* [#254](https://github.com/httprb/http/pull/254):
|
|
579
|
-
Removed use of an ActiveSupport specific method #present?
|
|
580
|
-
([@tarcieri])
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
## 0.9.5 (2015-09-06)
|
|
584
|
-
|
|
585
|
-
* [#252](https://github.com/httprb/http/pull/252):
|
|
586
|
-
Fixed infinite hang/timeout when a request contained more than ~16,363 bytes.
|
|
587
|
-
([@zanker])
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
## 0.9.4 (2015-08-26)
|
|
591
|
-
|
|
592
|
-
* [#246](https://github.com/httprb/http/issues/246):
|
|
593
|
-
Fixes regression when body streaming was failing on some URIs.
|
|
594
|
-
([@zanker])
|
|
595
|
-
* [#243](https://github.com/httprb/http/issues/243):
|
|
596
|
-
Fixes require timeout statements. ([@ixti])
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
## 0.9.3 (2015-08-19)
|
|
600
|
-
|
|
601
|
-
* [#246](https://github.com/httprb/http/issues/246):
|
|
602
|
-
Fixed request URI normalization. ([@ixti])
|
|
603
|
-
- Avoids query component normalization
|
|
604
|
-
- Omits fragment component in headline
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
## 0.9.2 (2015-08-18)
|
|
608
|
-
|
|
609
|
-
* Fixed exceptionless NIO EOF handling. ([@zanker])
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
## 0.9.1 (2015-08-14)
|
|
613
|
-
|
|
614
|
-
* [#246](https://github.com/httprb/http/issues/246):
|
|
615
|
-
Fix params special-chars escaping. ([@ixti])
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
## 0.9.0 (2015-07-23)
|
|
619
|
-
|
|
620
|
-
* [#240](https://github.com/httprb/http/pull/240):
|
|
621
|
-
Support for caching removed. ([@tarcieri])
|
|
622
|
-
* JRuby 9000 compatibility
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
## 0.8.14 (2015-08-19)
|
|
626
|
-
|
|
627
|
-
* Backport request URI normalization fixes from master. ([@ixti])
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
## 0.8.13 (2015-08-14)
|
|
631
|
-
|
|
632
|
-
* Backport params special-chars escaping fix from `v0.9.1`. ([@ixti])
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
## 0.8.12 (2015-05-26)
|
|
636
|
-
|
|
637
|
-
* Fix `HTTP.timeout` API (was loosing previously defined options). ([@ixti])
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
## 0.8.11 (2015-05-22)
|
|
641
|
-
|
|
642
|
-
* [#229](https://github.com/httprb/http/pull/229):
|
|
643
|
-
SNI support for HTTPS connections. ([@tarcieri])
|
|
644
|
-
* [#227](https://github.com/httprb/http/pull/227):
|
|
645
|
-
Use "http.rb" in the User-Agent string. ([@tarcieri])
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
## 0.8.10 (2015-05-14)
|
|
649
|
-
|
|
650
|
-
* Fix cookie headers generation. ([@ixti])
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
## 0.8.9 (2015-05-11)
|
|
654
|
-
|
|
655
|
-
* Add cookies support. ([@ixti])
|
|
656
|
-
* [#219](https://github.com/httprb/http/pull/219):
|
|
657
|
-
Enforce stringified body encoding. ([@Connorhd])
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
## 0.8.8 (2015-05-09)
|
|
661
|
-
|
|
662
|
-
* [#217](https://github.com/httprb/http/issues/217):
|
|
663
|
-
Fix CONNECT header for proxies. ([@Connorhd])
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
## 0.8.7 (2015-05-08)
|
|
667
|
-
|
|
668
|
-
* Fix `HTTP.timeout` API with options only given. ([@ixti])
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
## 0.8.6 (2015-05-08)
|
|
672
|
-
|
|
673
|
-
* [#215](https://github.com/httprb/http/pull/215):
|
|
674
|
-
Reset global timeouts after the request finishes. ([@zanker])
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
## 0.8.5 (2015-05-06)
|
|
678
|
-
|
|
679
|
-
* [#205](https://github.com/httprb/http/issues/205):
|
|
680
|
-
Add simple timeouts configuration API. ([@ixti])
|
|
681
|
-
* Deprecate `Request#request_header`. Use `Request#headline` instead. ([@ixti])
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
## 0.8.4 (2015-04-23)
|
|
685
|
-
|
|
686
|
-
* Deprecate `#default_headers` and `#default_headers=`. ([@ixti])
|
|
687
|
-
* [#207](https://github.com/httprb/http/issues/207):
|
|
688
|
-
Deprecate chainable methods with `with_` prefix. ([@ixti])
|
|
689
|
-
* [#186](https://github.com/httprb/http/pull/186):
|
|
690
|
-
Add support of HTTPS connections through proxy. ([@Connorhd])
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
## 0.8.3 (2015-04-07)
|
|
694
|
-
|
|
695
|
-
* [#206](https://github.com/httprb/http/issues/206):
|
|
696
|
-
Fix request headline. ([@ixti])
|
|
697
|
-
* Remove deprecated `Request#__method__`. ([@ixti])
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
## 0.8.2 (2015-04-06)
|
|
701
|
-
|
|
702
|
-
* [#203](https://github.com/httprb/http/issues/203):
|
|
703
|
-
Fix Celluloid::IO compatibility. ([@ixti])
|
|
704
|
-
* Cleanup obsolete code. ([@zanker])
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
## 0.8.1 (2015-04-02)
|
|
708
|
-
|
|
709
|
-
* [#202](https://github.com/httprb/http/issues/202):
|
|
710
|
-
Add missing `require "resolv"`. ([@ixti])
|
|
711
|
-
* [#200](https://github.com/httprb/http/issues/200),
|
|
712
|
-
[#201](https://github.com/httprb/http/pull/201):
|
|
713
|
-
Add block-form `#persistent` calls. ([@ixti])
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
## 0.8.0 (2015-04-01)
|
|
717
|
-
|
|
718
|
-
* [#199](https://github.com/httprb/http/pull/199):
|
|
719
|
-
Properly handle WaitWritable for SSL. ([@zanker])
|
|
720
|
-
* [#197](https://github.com/httprb/http/pull/197):
|
|
721
|
-
Add support for non-ASCII URis. ([@ixti])
|
|
722
|
-
* [#187](https://github.com/httprb/http/pull/187),
|
|
723
|
-
[#194](https://github.com/httprb/http/pull/194),
|
|
724
|
-
[#195](https://github.com/httprb/http/pull/195):
|
|
725
|
-
Add configurable connection timeouts. ([@zanker])
|
|
726
|
-
* [#179](https://github.com/httprb/http/pull/179):
|
|
727
|
-
Refactor requests redirect following logic. ([@ixti])
|
|
728
|
-
* Support for persistent HTTP connections ([@zanker])
|
|
729
|
-
* [#77](https://github.com/httprb/http/issues/77),
|
|
730
|
-
[#177](https://github.com/httprb/http/pull/177):
|
|
731
|
-
Add caching support. ([@Asmod4n], [@pezra])
|
|
732
|
-
* [#176](https://github.com/httprb/http/pull/176):
|
|
733
|
-
Improve servers used in specs boot up. Issue was initially raised up
|
|
734
|
-
by [@olegkovalenko]. ([@ixti])
|
|
735
|
-
* Reflect FormData rename changes (FormData -> HTTP::FormData). ([@ixti])
|
|
736
|
-
* [#173](https://github.com/httprb/http/pull/173):
|
|
737
|
-
`HTTP::Headers` now raises `HTTP::InvalidHeaderNameError` in case of
|
|
738
|
-
(surprise) invalid HTTP header field name (e.g.`"Foo:Bar"`). ([@ixti])
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
## 0.7.3 (2015-03-24)
|
|
742
|
-
|
|
743
|
-
* SECURITY FIX: http.rb failed to call the `#post_connection_check` method on
|
|
744
|
-
SSL connections. This method implements hostname verification, and without it
|
|
745
|
-
`http.rb` was vulnerable to MitM attacks. The problem was corrected by calling
|
|
746
|
-
`#post_connection_check` (CVE-2015-1828) ([@zanker])
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
## 0.7.2 (2015-03-02)
|
|
750
|
-
|
|
751
|
-
* Swap from `form_data` to `http-form_data` (changed gem name).
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
## 0.7.1 (2015-01-03)
|
|
755
|
-
|
|
756
|
-
* Gemspec fixups
|
|
757
|
-
* Remove superfluous space in HTTP::Response inspection
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
## 0.7.0 (2015-01-02)
|
|
761
|
-
|
|
762
|
-
* [#73](https://github.com/httprb/http/issues/73),
|
|
763
|
-
[#167](https://github.com/httprb/http/pull/167):
|
|
764
|
-
Add support of multipart form data. ([@ixti])
|
|
765
|
-
* Fix URI path normalization: `https://github.com` -> `https://github.com/`.
|
|
766
|
-
([@ixti])
|
|
767
|
-
* [#163](https://github.com/httprb/http/pull/163),
|
|
768
|
-
[#166](https://github.com/httprb/http/pull/166),
|
|
769
|
-
[#152](https://github.com/httprb/http/issues/152):
|
|
770
|
-
Fix handling of EOF which caused infinite loop. ([@mickm], [@ixti])
|
|
771
|
-
* Drop Ruby 1.8.7 support. ([@ixti])
|
|
772
|
-
* [#150](https://github.com/httprb/http/issues/150):
|
|
773
|
-
Fix default Host header value. ([@ixti])
|
|
774
|
-
* Remove BearerToken authorization header. ([@ixti])
|
|
775
|
-
* `#auth` sugar now accepts only string value of Authorization header.
|
|
776
|
-
Calling `#auth(:basic, opts)` is deprecated, use `#basic_auth(opts)` instead.
|
|
777
|
-
([@ixti])
|
|
778
|
-
* Fix handling of chunked responses without Content-Length header. ([@ixti])
|
|
779
|
-
* Remove `HTTP::Request#method` and deprecate `HTTP::Request#__method__`
|
|
780
|
-
([@sferik])
|
|
781
|
-
* Deprecate `HTTP::Response::STATUS_CODES`,
|
|
782
|
-
use `HTTP::Response::Status::REASONS` instead ([@ixti])
|
|
783
|
-
* Deprecate `HTTP::Response::SYMBOL_TO_STATUS_CODE` ([@ixti])
|
|
784
|
-
* Deprecate `HTTP::Response#status_code` ([@ixti])
|
|
785
|
-
* `HTTP::Response#status` now returns `HTTP::Response::Status`. ([@ixti])
|
|
786
|
-
* `HTTP::Response#reason` and `HTTP::Response#code` are proxies them
|
|
787
|
-
to corresponding methods of `HTTP::Response#status` ([@ixti])
|
|
788
|
-
* Rename `HTTP.with_follow` to `HTTP.follow` and mark former one as being
|
|
789
|
-
deprecated ([@ixti])
|
|
790
|
-
* Delegate `HTTP::Response#readpartial` to `HTTP::Response::Body` ([@ixti])
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
## 0.6.4 (2015-03-25)
|
|
794
|
-
|
|
795
|
-
* SECURITY FIX: http.rb failed to call the `#post_connection_check` method on
|
|
796
|
-
SSL connections. This method implements hostname verification, and without it
|
|
797
|
-
`http.rb` was vulnerable to MitM attacks. The problem was corrected by calling
|
|
798
|
-
`#post_connection_check` (CVE-2015-1828) ([@zanker], backported by [@nicoolas25])
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
## 0.6.3 (2014-11-14)
|
|
802
|
-
|
|
803
|
-
* [#166](https://github.com/httprb/http/pull/166):
|
|
804
|
-
Backported EOF fix from master branch. ([@ixti])
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
## 0.6.2 (2014-08-06)
|
|
808
|
-
|
|
809
|
-
* [#150](https://github.com/httprb/http/issues/150):
|
|
810
|
-
Fix default Host header value. ([@ixti])
|
|
811
|
-
* Deprecate BearerToken authorization header. ([@ixti])
|
|
812
|
-
* Fix handling of chunked responses without Content-Length header. ([@ixti])
|
|
813
|
-
* Rename `HTTP.with_follow` to `HTTP.follow` and mark former one as being
|
|
814
|
-
deprecated ([@ixti])
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
## 0.6.1 (2014-05-07)
|
|
818
|
-
|
|
819
|
-
* Fix request `Content-Length` calculation for Unicode ([@challengee])
|
|
820
|
-
* Add `Response#flush` ([@ixti])
|
|
821
|
-
* Fix `Response::Body#readpartial` default size ([@hannesg], [@ixti])
|
|
822
|
-
* Add missing `CRLF` for chunked bodies ([@hannesg])
|
|
823
|
-
* Fix forgotten CGI require ([@ixti])
|
|
824
|
-
* Improve README ([@tarcieri])
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
## 0.6.0 (2014-04-04)
|
|
828
|
-
|
|
829
|
-
* Rename `HTTP::Request#method` to `HTTP::Request#verb` ([@krainboltgreene])
|
|
830
|
-
* Add `HTTP::ResponseBody` class ([@tarcieri])
|
|
831
|
-
* Change API of response on `HTTP::Client.request` and "friends" (`#get`, `#post`, etc) ([@tarcieri])
|
|
832
|
-
* Add `HTTP::Response#readpartial` ([@tarcieri])
|
|
833
|
-
* Add `HTTP::Headers` class ([@ixti])
|
|
834
|
-
* Fix and improve following redirects ([@ixti])
|
|
835
|
-
* Add `HTTP::Request#redirect` ([@ixti])
|
|
836
|
-
* Add `HTTP::Response#content_type` ([@ixti])
|
|
837
|
-
* Add `HTTP::Response#mime_type` ([@ixti])
|
|
838
|
-
* Add `HTTP::Response#charset` ([@ixti])
|
|
839
|
-
* Improve error message upon invalid URI scheme ([@ixti])
|
|
840
|
-
* Consolidate errors under common `HTTP::Error` namespace ([@ixti])
|
|
841
|
-
* Add easy way of adding Authorization header ([@ixti])
|
|
842
|
-
* Fix proxy support ([@hundredwatt])
|
|
843
|
-
* Fix and improve query params handing ([@jwinter])
|
|
844
|
-
* Change API of custom MIME type parsers ([@ixti])
|
|
845
|
-
* Remove `HTTP::Chainable#with_response` ([@ixti])
|
|
846
|
-
* Remove `HTTP::Response::BodyDelegator` ([@ixti])
|
|
847
|
-
* Remove `HTTP::Response#parsed_body` ([@ixti])
|
|
848
|
-
* Bump up input buffer from 4K to 16K ([@tarcieri])
|
|
849
|
-
|
|
850
|
-
``` ruby
|
|
851
|
-
# Main API change you will mention is that `request` method and it's
|
|
852
|
-
# syntax sugar helpers like `get`, `post`, etc. now returns Response
|
|
853
|
-
# object instead of BodyDelegator:
|
|
854
|
-
|
|
855
|
-
response = HTTP.get "http://example.com"
|
|
856
|
-
raw_body = HTTP.get("http://example.com").to_s
|
|
857
|
-
parsed_body = HTTP.get("http://example.com/users.json").parse
|
|
858
|
-
|
|
859
|
-
# Second major change in API is work with request/response headers
|
|
860
|
-
# It is now delegated to `HTTP::Headers` class, so you can check it's
|
|
861
|
-
# documentation for details, here we will only outline main difference.
|
|
862
|
-
# Duckface (`=`) does not appends headers anymore
|
|
863
|
-
|
|
864
|
-
request[:content_type] = "text/plain"
|
|
865
|
-
request[:content_type] = "text/html"
|
|
866
|
-
request[:content_type] # => "text/html"
|
|
867
|
-
|
|
868
|
-
# In order to add multiple header values, you should pass array:
|
|
869
|
-
|
|
870
|
-
request[:cookie] = ["foo=bar", "woo=hoo"]
|
|
871
|
-
request[:cookie] # => ["foo=bar", "woo=hoo"]
|
|
872
|
-
|
|
873
|
-
# or call `#add` on headers:
|
|
874
|
-
|
|
875
|
-
request.headers.add :accept, "text/plain"
|
|
876
|
-
request.headers.add :accept, "text/html"
|
|
877
|
-
request[:accept] # => ["text/plain", "text/html"]
|
|
878
|
-
|
|
879
|
-
# Also, you can now read body in chunks (stream):
|
|
880
|
-
|
|
881
|
-
res = HTTP.get "http://example.com"
|
|
882
|
-
File.open "/tmp/dummy.bin", "wb" do |io|
|
|
883
|
-
while (chunk = res.readpartial)
|
|
884
|
-
io << chunk
|
|
885
|
-
end
|
|
886
|
-
end
|
|
887
|
-
```
|
|
888
|
-
|
|
889
|
-
[Changes discussion](https://github.com/httprb/http.rb/issues/116)
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
## 0.5.1 (2014-05-27)
|
|
893
|
-
|
|
894
|
-
* Backports redirector fixes from 0.6.0 ([@ixti])
|
|
895
|
-
* EOL of 0.5.X branch.
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
## 0.5.0 (2013-09-14)
|
|
899
|
-
|
|
900
|
-
* Add query string support
|
|
901
|
-
* New response delegator allows HTTP.get(uri).response
|
|
902
|
-
* HTTP::Chainable#stream provides a shorter alias for
|
|
903
|
-
with_response(:object)
|
|
904
|
-
* Better string inspect for HTTP::Response
|
|
905
|
-
* Curb compatibility layer removed
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
## 0.4.0 (2012-10-12)
|
|
909
|
-
|
|
910
|
-
* Fix bug accessing https URLs
|
|
911
|
-
* Fix several instances of broken redirect handling
|
|
912
|
-
* Add default user agent
|
|
913
|
-
* Many additional minor bugfixes
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
## 0.3.0 (2012-09-01)
|
|
917
|
-
|
|
918
|
-
* New implementation based on tmm1's http_parser.rb instead of Net::HTTP
|
|
919
|
-
* Support for following redirects
|
|
920
|
-
* Support for request body through {:body => ...} option
|
|
921
|
-
* HTTP#with_response (through Chainable)
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
## 0.2.0 (2012-03-05)
|
|
925
|
-
|
|
926
|
-
* Request and response objects
|
|
927
|
-
* Callback system
|
|
928
|
-
* Internal refactoring ensuring true chainability
|
|
929
|
-
* Use the certified gem to ensure SSL certificate verification
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
## 0.1.0 (2012-01-26)
|
|
933
|
-
|
|
934
|
-
* Testing against WEBrick
|
|
935
|
-
* Curb compatibility (require 'http/compat/curb')
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
## 0.0.1 (2011-10-11)
|
|
939
|
-
|
|
940
|
-
* Initial half-baked release
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
## 0.0.0 (2011-10-06)
|
|
944
|
-
|
|
945
|
-
* Vapoware release to claim the "http" gem name >:D
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
[@tarcieri]: https://github.com/tarcieri
|
|
949
|
-
[@zanker]: https://github.com/zanker
|
|
950
|
-
[@ixti]: https://github.com/ixti
|
|
951
|
-
[@Connorhd]: https://github.com/Connorhd
|
|
952
|
-
[@Asmod4n]: https://github.com/Asmod4n
|
|
953
|
-
[@pezra]: https://github.com/pezra
|
|
954
|
-
[@olegkovalenko]: https://github.com/olegkovalenko
|
|
955
|
-
[@mickm]: https://github.com/mickm
|
|
956
|
-
[@sferik]: https://github.com/sferik
|
|
957
|
-
[@nicoolas25]: https://github.com/nicoolas25
|
|
958
|
-
[@challengee]: https://github.com/challengee
|
|
959
|
-
[@hannesg]: https://github.com/hannesg
|
|
960
|
-
[@krainboltgreene]: https://github.com/krainboltgreene
|
|
961
|
-
[@hundredwatt]: https://github.com/hundredwatt
|
|
962
|
-
[@jwinter]: https://github.com/jwinter
|
|
963
|
-
[@nerdrew]: https://github.com/nerdrew
|
|
964
|
-
[@kylekyle]: https://github.com/kylekyle
|
|
965
|
-
[@smudge]: https://github.com/smudge
|
|
966
|
-
[@mwitek]: https://github.com/mwitek
|
|
967
|
-
[@tonyta]: https://github.com/tonyta
|
|
968
|
-
[@jhbabon]: https://github.com/jhbabon
|
|
969
|
-
[@britishtea]: https://github.com/britishtea
|
|
970
|
-
[@janko-m]: https://github.com/janko-m
|
|
971
|
-
[@Bonias]: https://github.com/Bonias
|
|
972
|
-
[@HoneyryderChuck]: https://github.com/HoneyryderChuck
|
|
973
|
-
[@marshall-lee]: https://github.com/marshall-lee
|
|
974
|
-
[@scarfacedeb]: https://github.com/scarfacedeb
|
|
975
|
-
[@mikegee]: https://github.com/mikegee
|
|
976
|
-
[@tycoon]: https://github.com/tycooon
|
|
977
|
-
[@paul]: https://github.com/paul
|
|
978
|
-
[@RickCSong]: https://github.com/RickCSong
|
|
979
|
-
[@fxposter]: https://github.com/fxposter
|
|
980
|
-
[@mamoonraja]: https://github.com/mamoonraja
|
|
981
|
-
[@joshuaflanagan]: https://github.com/joshuaflanagan
|
|
982
|
-
[@antonvolkoff]: https://github.com/antonvolkoff
|
|
983
|
-
[@LukaszMaslej]: https://github.com/LukaszMaslej
|
|
984
|
-
[@colemannugent]: https://github.com/colemannugent
|
|
985
|
-
[@semenyukdmitry]: https://github.com/semenyukdmitry
|
|
986
|
-
[@bryanp]: https://github.com/bryanp
|
|
987
|
-
[@meanphil]: https://github.com/meanphil
|
|
988
|
-
[@odinhb]: https://github.com/odinhb
|
|
989
|
-
[@DannyBen]: https://github.com/DannyBen
|
|
990
|
-
[@jyn514]: https://github.com/jyn514
|
|
991
|
-
[@bvicenzo]: https://github.com/bvicenzo
|
|
992
|
-
[@nomis]: https://github.com/nomis
|
|
993
|
-
[@midnight-wonderer]: https://github.com/midnight-wonderer
|
|
994
|
-
[@schwern]: https://github.com/schwern
|
|
995
|
-
[@matheussilvasantos]: https://github.com/matheussilvasantos
|
|
996
|
-
[@PhilCoggins]: https://github.com/PhilCoggins
|
|
997
|
-
[@flosacca]: https://github.com/flosacca
|
|
998
|
-
[@YuLeven]: https://github.com/YuLeven
|
|
999
|
-
[@drwl]: https://github.com/drwl
|
|
1000
|
-
[@tkellogg]: https://github.com/tkellogg
|
|
1001
|
-
[@jeraki]: https://github.com/jeraki
|
|
1002
|
-
[@benubois]: https://github.com/benubois
|