http 0.9.7 → 0.9.8
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/CHANGES.md +161 -97
- data/lib/http/timeout/global.rb +4 -0
- data/lib/http/version.rb +1 -1
- data/spec/lib/http/client_spec.rb +5 -2
- data/spec/support/http_handling_shared.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33850aa83bf574cc7c05572dd92bc190e198b6e4
|
4
|
+
data.tar.gz: 5b7a2359fc586d691b85e59921bec5d1bcfb5b1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf74a760183582d0bedf897f870a39607e3f808e24a64e0e89084cb4d038884f7b5cc891cb0062859799d497d7089253ec09c997e8b5719c42c9563629951cb0
|
7
|
+
data.tar.gz: 8fd03c0819fb1dc1e41deef051b3f3039b6e41c11f15509e4f96234decaec95d2776491ef384d3a7cdbde4eb8c7b3dd85b149bf702d93b2c2cc2b14ae3230728
|
data/CHANGES.md
CHANGED
@@ -1,140 +1,179 @@
|
|
1
|
+
## 0.9.8 (2015-09-29)
|
2
|
+
|
3
|
+
* [#260](https://github.com/httprb/http/pull/258):
|
4
|
+
Fixed global timeout persisting time left across requests when reusing connections.
|
5
|
+
([@zanker][])
|
6
|
+
|
1
7
|
## 0.9.7 (2015-09-19)
|
2
8
|
|
3
|
-
*
|
4
|
-
|
9
|
+
* [#258](https://github.com/httprb/http/pull/258):
|
10
|
+
Unified strategy for handling exception-based and exceptionless non-blocking
|
11
|
+
I/O. Fixes SSL support on JRuby 9000. ([@tarcieri][])
|
12
|
+
|
5
13
|
|
6
14
|
## 0.9.6 (2015-09-06)
|
7
15
|
|
8
|
-
*
|
9
|
-
|
16
|
+
* [#254](https://github.com/httprb/http/pull/254):
|
17
|
+
Removed use of an ActiveSupport specific method #present?
|
18
|
+
([@tarcieri][])
|
19
|
+
|
10
20
|
|
11
21
|
## 0.9.5 (2015-09-06)
|
12
22
|
|
13
|
-
*
|
14
|
-
|
23
|
+
* [#252](https://github.com/httprb/http/pull/252):
|
24
|
+
Fixed infinite hang/timeout when a request contained more than ~16,363 bytes.
|
25
|
+
([@zanker][])
|
26
|
+
|
15
27
|
|
16
28
|
## 0.9.4 (2015-08-26)
|
17
29
|
|
18
|
-
*
|
19
|
-
|
20
|
-
|
30
|
+
* [#246](https://github.com/httprb/http/issues/246):
|
31
|
+
Fixes regression when body streaming was failing on some URIs.
|
32
|
+
([@zanker][])
|
33
|
+
* [#243](https://github.com/httprb/http/issues/243):
|
34
|
+
Fixes require timeout statements. ([@ixti][])
|
21
35
|
|
22
36
|
|
23
37
|
## 0.9.3 (2015-08-19)
|
24
38
|
|
25
|
-
*
|
39
|
+
* [#246](https://github.com/httprb/http/issues/246):
|
40
|
+
Fixed request URI normalization. ([@ixti][])
|
26
41
|
- Avoids query component normalization
|
27
42
|
- Omits fragment component in headline
|
28
43
|
|
29
44
|
|
30
45
|
## 0.9.2 (2015-08-18)
|
31
46
|
|
32
|
-
* Fixed exceptionless NIO EOF handling. (@zanker)
|
47
|
+
* Fixed exceptionless NIO EOF handling. ([@zanker][])
|
33
48
|
|
34
49
|
|
35
50
|
## 0.9.1 (2015-08-14)
|
36
51
|
|
37
|
-
*
|
52
|
+
* [#246](https://github.com/httprb/http/issues/246):
|
53
|
+
Fix params special-chars escaping. ([@ixti][])
|
38
54
|
|
39
55
|
|
40
56
|
## 0.9.0 (2015-07-23)
|
41
57
|
|
42
|
-
*
|
58
|
+
* [#240](https://github.com/httprb/http/pull/240):
|
59
|
+
Support for caching removed. ([@tarcieri][])
|
43
60
|
* JRuby 9000 compatibility
|
44
61
|
|
45
62
|
|
46
63
|
## 0.8.14 (2015-08-19)
|
47
64
|
|
48
|
-
* Backport request URI normalization fixes from master. (@ixti)
|
65
|
+
* Backport request URI normalization fixes from master. ([@ixti][])
|
49
66
|
|
50
67
|
|
51
68
|
## 0.8.13 (2015-08-14)
|
52
69
|
|
53
|
-
* Backport params special-chars escaping fix from `v0.9.1`. (@ixti)
|
70
|
+
* Backport params special-chars escaping fix from `v0.9.1`. ([@ixti][])
|
54
71
|
|
55
72
|
|
56
73
|
## 0.8.12 (2015-05-26)
|
57
74
|
|
58
|
-
* Fix `HTTP.timeout` API (was loosing previously defined options). (@ixti)
|
75
|
+
* Fix `HTTP.timeout` API (was loosing previously defined options). ([@ixti][])
|
59
76
|
|
60
77
|
|
61
78
|
## 0.8.11 (2015-05-22)
|
62
79
|
|
63
|
-
*
|
64
|
-
|
80
|
+
* [#229](https://github.com/httprb/http/pull/229):
|
81
|
+
SNI support for HTTPS connections. ([@tarcieri][])
|
82
|
+
* [#227](https://github.com/httprb/http/pull/227):
|
83
|
+
Use "http.rb" in the User-Agent string. ([@tarcieri][])
|
65
84
|
|
66
85
|
|
67
86
|
## 0.8.10 (2015-05-14)
|
68
87
|
|
69
|
-
* Fix cookie headers generation. (@ixti)
|
88
|
+
* Fix cookie headers generation. ([@ixti][])
|
70
89
|
|
71
90
|
|
72
91
|
## 0.8.9 (2015-05-11)
|
73
92
|
|
74
|
-
* Add cookies support. (@ixti)
|
75
|
-
*
|
93
|
+
* Add cookies support. ([@ixti][])
|
94
|
+
* [#219](https://github.com/httprb/http/pull/219):
|
95
|
+
Enforce stringified body encoding. ([@Connorhd][])
|
76
96
|
|
77
97
|
|
78
98
|
## 0.8.8 (2015-05-09)
|
79
99
|
|
80
|
-
*
|
100
|
+
* [#217](https://github.com/httprb/http/issues/217):
|
101
|
+
Fix CONNECT header for proxies. ([@Connorhd][])
|
81
102
|
|
82
103
|
|
83
104
|
## 0.8.7 (2015-05-08)
|
84
105
|
|
85
|
-
* Fix `HTTP.timeout` API with options only given. (@ixti)
|
106
|
+
* Fix `HTTP.timeout` API with options only given. ([@ixti][])
|
86
107
|
|
87
108
|
|
88
109
|
## 0.8.6 (2015-05-08)
|
89
110
|
|
90
|
-
*
|
111
|
+
* [#215](https://github.com/httprb/http/pull/215):
|
112
|
+
Reset global timeouts after the request finishes. ([@zanker][])
|
91
113
|
|
92
114
|
|
93
115
|
## 0.8.5 (2015-05-06)
|
94
116
|
|
95
|
-
*
|
96
|
-
|
117
|
+
* [#205](https://github.com/httprb/http/issues/205):
|
118
|
+
Add simple timeouts configuration API. ([@ixti][])
|
119
|
+
* Deprecate `Request#request_header`. Use `Request#headline` instead. ([@ixti][])
|
97
120
|
|
98
121
|
|
99
122
|
## 0.8.4 (2015-04-23)
|
100
123
|
|
101
|
-
* Deprecate `#default_headers` and `#default_headers=`. (@ixti)
|
102
|
-
*
|
103
|
-
|
124
|
+
* Deprecate `#default_headers` and `#default_headers=`. ([@ixti][])
|
125
|
+
* [#207](https://github.com/httprb/http/issues/207):
|
126
|
+
Deprecate chainable methods with `with_` prefix. ([@ixti][])
|
127
|
+
* [#186](https://github.com/httprb/http/pull/186):
|
128
|
+
Add support of HTTPS connections through proxy. ([@Connorhd][])
|
104
129
|
|
105
130
|
|
106
131
|
## 0.8.3 (2015-04-07)
|
107
132
|
|
108
|
-
*
|
109
|
-
|
133
|
+
* [#206](https://github.com/httprb/http/issues/206):
|
134
|
+
Fix request headline. ([@ixti][])
|
135
|
+
* Remove deprecated `Request#__method__`. ([@ixti][])
|
110
136
|
|
111
137
|
|
112
138
|
## 0.8.2 (2015-04-06)
|
113
139
|
|
114
|
-
*
|
115
|
-
|
140
|
+
* [#203](https://github.com/httprb/http/issues/203):
|
141
|
+
Fix Celluloid::IO compatibility. ([@ixti][])
|
142
|
+
* Cleanup obsolete code. ([@zanker][])
|
116
143
|
|
117
144
|
|
118
145
|
## 0.8.1 (2015-04-02)
|
119
146
|
|
120
|
-
*
|
121
|
-
|
147
|
+
* [#202](https://github.com/httprb/http/issues/202):
|
148
|
+
Add missing `require "resolv"`. ([@ixti][])
|
149
|
+
* [#200](https://github.com/httprb/http/issues/200),
|
150
|
+
[#201](https://github.com/httprb/http/pull/201):
|
151
|
+
Add block-form `#persistent` calls. ([@ixti][])
|
122
152
|
|
123
153
|
|
124
154
|
## 0.8.0 (2015-04-01)
|
125
155
|
|
126
|
-
*
|
127
|
-
|
128
|
-
*
|
129
|
-
|
130
|
-
*
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
*
|
135
|
-
|
136
|
-
|
137
|
-
|
156
|
+
* [#199](https://github.com/httprb/http/pull/199):
|
157
|
+
Properly handle WaitWritable for SSL. ([@zanker][])
|
158
|
+
* [#197](https://github.com/httprb/http/pull/197):
|
159
|
+
Add support for non-ASCII URis. ([@ixti][])
|
160
|
+
* [#187](https://github.com/httprb/http/pull/187),
|
161
|
+
[#194](https://github.com/httprb/http/pull/194),
|
162
|
+
[#195](https://github.com/httprb/http/pull/195):
|
163
|
+
Add configurable connection timeouts. ([@zanker][])
|
164
|
+
* [#179](https://github.com/httprb/http/pull/179):
|
165
|
+
Refactor requests redirect following logic. ([@ixti][])
|
166
|
+
* Support for persistent HTTP connections ([@zanker][])
|
167
|
+
* [#77](https://github.com/httprb/http/issues/77),
|
168
|
+
[#177](https://github.com/httprb/http/pull/177):
|
169
|
+
Add caching support. ([@Asmod4n][], [@pezra][])
|
170
|
+
* [#176](https://github.com/httprb/http/pull/176):
|
171
|
+
Improve servers used in specs boot up. Issue was initially raised up
|
172
|
+
by [@olegkovalenko][]. ([@ixti][])
|
173
|
+
* Reflect FormData rename changes (FormData -> HTTP::FormData). ([@ixti][])
|
174
|
+
* [#173](https://github.com/httprb/http/pull/173):
|
175
|
+
`HTTP::Headers` now raises `HTTP::InvalidHeaderNameError` in case of
|
176
|
+
(surprise) invalid HTTP header field name (e.g.`"Foo:Bar"`). ([@ixti][])
|
138
177
|
|
139
178
|
|
140
179
|
## 0.7.3 (2015-03-24)
|
@@ -142,7 +181,7 @@
|
|
142
181
|
* SECURITY FIX: http.rb failed to call the `#post_connection_check` method on
|
143
182
|
SSL connections. This method implements hostname verification, and without it
|
144
183
|
`http.rb` was vulnerable to MitM attacks. The problem was corrected by calling
|
145
|
-
`#post_connection_check` (CVE-2015-1828) (@zanker)
|
184
|
+
`#post_connection_check` (CVE-2015-1828) ([@zanker][])
|
146
185
|
|
147
186
|
|
148
187
|
## 0.7.2 (2015-03-02)
|
@@ -158,29 +197,35 @@
|
|
158
197
|
|
159
198
|
## 0.7.0 (2015-01-02)
|
160
199
|
|
161
|
-
*
|
200
|
+
* [#73](https://github.com/httprb/http/issues/73),
|
201
|
+
[#167](https://github.com/httprb/http/pull/167):
|
202
|
+
Add support of multipart form data. ([@ixti][])
|
162
203
|
* Fix URI path normalization: `https://github.com` -> `https://github.com/`.
|
163
|
-
(@ixti)
|
164
|
-
*
|
165
|
-
|
166
|
-
|
167
|
-
|
204
|
+
([@ixti][])
|
205
|
+
* [#163](https://github.com/httprb/http/pull/163),
|
206
|
+
[#166](https://github.com/httprb/http/pull/166),
|
207
|
+
[#152](https://github.com/httprb/http/issues/152):
|
208
|
+
Fix handling of EOF which caused infinite loop. ([@mickm][], [@ixti][])
|
209
|
+
* Drop Ruby 1.8.7 support. ([@ixti][])
|
210
|
+
* [#150](https://github.com/httprb/http/issues/150):
|
211
|
+
Fix default Host header value. ([@ixti][])
|
212
|
+
* Remove BearerToken authorization header. ([@ixti][])
|
168
213
|
* `#auth` sugar now accepts only string value of Authorization header.
|
169
214
|
Calling `#auth(:basic, opts)` is deprecated, use `#basic_auth(opts)` instead.
|
170
|
-
(@ixti)
|
171
|
-
* Fix handling of chunked responses without Content-Length header. (@ixti)
|
215
|
+
([@ixti][])
|
216
|
+
* Fix handling of chunked responses without Content-Length header. ([@ixti][])
|
172
217
|
* Remove `HTTP::Request#method` and deprecate `HTTP::Request#__method__`
|
173
|
-
(@sferik)
|
218
|
+
([@sferik][])
|
174
219
|
* Deprecate `HTTP::Response::STATUS_CODES`,
|
175
|
-
use `HTTP::Response::Status::REASONS` instead (@ixti)
|
176
|
-
* Deprecate `HTTP::Response::SYMBOL_TO_STATUS_CODE` (@ixti)
|
177
|
-
* Deprecate `HTTP::Response#status_code` (@ixti)
|
178
|
-
* `HTTP::Response#status` now returns `HTTP::Response::Status`. (@ixti)
|
220
|
+
use `HTTP::Response::Status::REASONS` instead ([@ixti][])
|
221
|
+
* Deprecate `HTTP::Response::SYMBOL_TO_STATUS_CODE` ([@ixti][])
|
222
|
+
* Deprecate `HTTP::Response#status_code` ([@ixti][])
|
223
|
+
* `HTTP::Response#status` now returns `HTTP::Response::Status`. ([@ixti][])
|
179
224
|
* `HTTP::Response#reason` and `HTTP::Response#code` are proxies them
|
180
|
-
to corresponding methods of `HTTP::Response#status` (@ixti)
|
225
|
+
to corresponding methods of `HTTP::Response#status` ([@ixti][])
|
181
226
|
* Rename `HTTP.with_follow` to `HTTP.follow` and mark former one as being
|
182
|
-
deprecated (@ixti)
|
183
|
-
* Delegate `HTTP::Response#readpartial` to `HTTP::Response::Body` (@ixti)
|
227
|
+
deprecated ([@ixti][])
|
228
|
+
* Delegate `HTTP::Response#readpartial` to `HTTP::Response::Body` ([@ixti][])
|
184
229
|
|
185
230
|
|
186
231
|
## 0.6.4 (2015-03-25)
|
@@ -188,55 +233,57 @@
|
|
188
233
|
* SECURITY FIX: http.rb failed to call the `#post_connection_check` method on
|
189
234
|
SSL connections. This method implements hostname verification, and without it
|
190
235
|
`http.rb` was vulnerable to MitM attacks. The problem was corrected by calling
|
191
|
-
`#post_connection_check` (CVE-2015-1828) (@zanker, backported by @nicoolas25)
|
236
|
+
`#post_connection_check` (CVE-2015-1828) ([@zanker][], backported by [@nicoolas25][])
|
192
237
|
|
193
238
|
|
194
239
|
## 0.6.3 (2014-11-14)
|
195
240
|
|
196
|
-
*
|
241
|
+
* [#166](https://github.com/httprb/http/pull/166):
|
242
|
+
Backported EOF fix from master branch. ([@ixti][])
|
197
243
|
|
198
244
|
|
199
245
|
## 0.6.2 (2014-08-06)
|
200
246
|
|
201
|
-
*
|
202
|
-
|
203
|
-
*
|
247
|
+
* [#150](https://github.com/httprb/http/issues/150):
|
248
|
+
Fix default Host header value. ([@ixti][])
|
249
|
+
* Deprecate BearerToken authorization header. ([@ixti][])
|
250
|
+
* Fix handling of chunked responses without Content-Length header. ([@ixti][])
|
204
251
|
* Rename `HTTP.with_follow` to `HTTP.follow` and mark former one as being
|
205
|
-
deprecated (@ixti)
|
252
|
+
deprecated ([@ixti][])
|
206
253
|
|
207
254
|
|
208
255
|
## 0.6.1 (2014-05-07)
|
209
256
|
|
210
|
-
* Fix request `Content-Length` calculation for Unicode (@
|
211
|
-
* Add `Response#flush` (@ixti)
|
212
|
-
* Fix `Response::Body#readpartial` default size (@hannesg, @ixti)
|
213
|
-
* Add missing `CRLF` for chunked bodies (@hannesg)
|
214
|
-
* Fix forgotten CGI require (@ixti)
|
215
|
-
* Improve README (@tarcieri)
|
257
|
+
* Fix request `Content-Length` calculation for Unicode ([@challengee][])
|
258
|
+
* Add `Response#flush` ([@ixti][])
|
259
|
+
* Fix `Response::Body#readpartial` default size ([@hannesg][], [@ixti][])
|
260
|
+
* Add missing `CRLF` for chunked bodies ([@hannesg][])
|
261
|
+
* Fix forgotten CGI require ([@ixti][])
|
262
|
+
* Improve README ([@tarcieri][])
|
216
263
|
|
217
264
|
|
218
265
|
## 0.6.0 (2014-04-04)
|
219
266
|
|
220
|
-
* Rename `HTTP::Request#method` to `HTTP::Request#verb` (@krainboltgreene)
|
221
|
-
* Add `HTTP::ResponseBody` class (@tarcieri)
|
222
|
-
* Change API of response on `HTTP::Client.request` and "friends" (`#get`, `#post`, etc) (@tarcieri)
|
223
|
-
* Add `HTTP::Response#readpartial` (@tarcieri)
|
224
|
-
* Add `HTTP::Headers` class (@ixti)
|
225
|
-
* Fix and improve following redirects (@ixti)
|
226
|
-
* Add `HTTP::Request#redirect` (@ixti)
|
227
|
-
* Add `HTTP::Response#content_type` (@ixti)
|
228
|
-
* Add `HTTP::Response#mime_type` (@ixti)
|
229
|
-
* Add `HTTP::Response#charset` (@ixti)
|
230
|
-
* Improve error message upon invalid URI scheme (@ixti)
|
231
|
-
* Consolidate errors under common `HTTP::Error` namespace (@ixti)
|
232
|
-
* Add easy way of adding Authorization header (@ixti)
|
233
|
-
* Fix proxy support (@hundredwatt)
|
234
|
-
* Fix and improve query params handing (@jwinter)
|
235
|
-
* Change API of custom MIME type parsers (@ixti)
|
236
|
-
* Remove `HTTP::Chainable#with_response` (@ixti)
|
237
|
-
* Remove `HTTP::Response::BodyDelegator` (@ixti)
|
238
|
-
* Remove `HTTP::Response#parsed_body` (@ixti)
|
239
|
-
* Bump up input buffer from 4K to 16K (@tarcieri)
|
267
|
+
* Rename `HTTP::Request#method` to `HTTP::Request#verb` ([@krainboltgreene][])
|
268
|
+
* Add `HTTP::ResponseBody` class ([@tarcieri][])
|
269
|
+
* Change API of response on `HTTP::Client.request` and "friends" (`#get`, `#post`, etc) ([@tarcieri][])
|
270
|
+
* Add `HTTP::Response#readpartial` ([@tarcieri][])
|
271
|
+
* Add `HTTP::Headers` class ([@ixti][])
|
272
|
+
* Fix and improve following redirects ([@ixti][])
|
273
|
+
* Add `HTTP::Request#redirect` ([@ixti][])
|
274
|
+
* Add `HTTP::Response#content_type` ([@ixti][])
|
275
|
+
* Add `HTTP::Response#mime_type` ([@ixti][])
|
276
|
+
* Add `HTTP::Response#charset` ([@ixti][])
|
277
|
+
* Improve error message upon invalid URI scheme ([@ixti][])
|
278
|
+
* Consolidate errors under common `HTTP::Error` namespace ([@ixti][])
|
279
|
+
* Add easy way of adding Authorization header ([@ixti][])
|
280
|
+
* Fix proxy support ([@hundredwatt][])
|
281
|
+
* Fix and improve query params handing ([@jwinter][])
|
282
|
+
* Change API of custom MIME type parsers ([@ixti][])
|
283
|
+
* Remove `HTTP::Chainable#with_response` ([@ixti][])
|
284
|
+
* Remove `HTTP::Response::BodyDelegator` ([@ixti][])
|
285
|
+
* Remove `HTTP::Response#parsed_body` ([@ixti][])
|
286
|
+
* Bump up input buffer from 4K to 16K ([@tarcieri][])
|
240
287
|
|
241
288
|
``` ruby
|
242
289
|
# Main API change you will mention is that `request` method and it's
|
@@ -282,7 +329,7 @@ end
|
|
282
329
|
|
283
330
|
## 0.5.1 (2014-05-27)
|
284
331
|
|
285
|
-
* Backports redirector fixes from 0.6.0 (@ixti)
|
332
|
+
* Backports redirector fixes from 0.6.0 ([@ixti][])
|
286
333
|
* EOL of 0.5.X branch.
|
287
334
|
|
288
335
|
|
@@ -334,3 +381,20 @@ end
|
|
334
381
|
## 0.0.0 (2011-10-06)
|
335
382
|
|
336
383
|
* Vapoware release to claim the "http" gem name >:D
|
384
|
+
|
385
|
+
|
386
|
+
[@tarcieri]: https://github.com/tarcieri
|
387
|
+
[@zanker]: https://github.com/zanker
|
388
|
+
[@ixti]: https://github.com/ixti
|
389
|
+
[@Connorhd]: https://github.com/Connorhd
|
390
|
+
[@Asmod4n]: https://github.com/Asmod4n
|
391
|
+
[@pezra]: https://github.com/pezra
|
392
|
+
[@olegkovalenko]: https://github.com/olegkovalenko
|
393
|
+
[@mickm]: https://github.com/mickm
|
394
|
+
[@sferik]: https://github.com/sferik
|
395
|
+
[@nicoolas25]: https://github.com/nicoolas25
|
396
|
+
[@challengee]: https://github.com/challengee
|
397
|
+
[@hannesg]: https://github.com/hannesg
|
398
|
+
[@krainboltgreene]: https://github.com/krainboltgreene
|
399
|
+
[@hundredwatt]: https://github.com/hundredwatt
|
400
|
+
[@jwinter]: https://github.com/jwinter
|
data/lib/http/timeout/global.rb
CHANGED
@@ -9,7 +9,11 @@ module HTTP
|
|
9
9
|
|
10
10
|
def initialize(*args)
|
11
11
|
super
|
12
|
+
reset_counter
|
13
|
+
end
|
12
14
|
|
15
|
+
# To future me: Don't remove this again, past you was smarter.
|
16
|
+
def reset_counter
|
13
17
|
@time_left = connect_timeout + read_timeout + write_timeout
|
14
18
|
@total_timeout = time_left
|
15
19
|
end
|
data/lib/http/version.rb
CHANGED
@@ -190,16 +190,19 @@ RSpec.describe HTTP::Client do
|
|
190
190
|
end
|
191
191
|
|
192
192
|
include_context "HTTP handling" do
|
193
|
+
let(:extra_options) { {} }
|
193
194
|
let(:options) { {} }
|
194
195
|
let(:server) { dummy }
|
195
|
-
let(:client) { described_class.new(options) }
|
196
|
+
let(:client) { described_class.new(options.merge(extra_options)) }
|
196
197
|
end
|
197
198
|
|
198
199
|
describe "working with SSL" do
|
199
200
|
run_server(:dummy_ssl) { DummyServer.new(:ssl => true) }
|
200
201
|
|
202
|
+
let(:extra_options) { {} }
|
203
|
+
|
201
204
|
let(:client) do
|
202
|
-
described_class.new options.merge
|
205
|
+
described_class.new options.merge(:ssl_context => SSLHelper.client_context).merge(extra_options)
|
203
206
|
end
|
204
207
|
|
205
208
|
include_context "HTTP handling" do
|
@@ -88,9 +88,9 @@ RSpec.shared_context "HTTP handling" do
|
|
88
88
|
end
|
89
89
|
|
90
90
|
context "it resets state when reusing connections" do
|
91
|
-
let(:
|
91
|
+
let(:extra_options) { {:persistent => server.endpoint} }
|
92
92
|
|
93
|
-
let(:read_timeout) {
|
93
|
+
let(:read_timeout) { 2.5 }
|
94
94
|
|
95
95
|
it "does not timeout" do
|
96
96
|
client.get("#{server.endpoint}/sleep").body.to_s
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Arcieri
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-09-
|
14
|
+
date: 2015-09-29 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: http_parser.rb
|
@@ -184,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
184
|
version: '0'
|
185
185
|
requirements: []
|
186
186
|
rubyforge_project:
|
187
|
-
rubygems_version: 2.4.
|
187
|
+
rubygems_version: 2.4.5.1
|
188
188
|
signing_key:
|
189
189
|
specification_version: 4
|
190
190
|
summary: HTTP should be easy
|