http 5.0.0.pre2 → 5.0.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/README.md +1 -0
- data/lib/http/response/parser.rb +5 -1
- data/lib/http/version.rb +1 -1
- data/spec/lib/http/response/parser_spec.rb +29 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d09142fafcb9b5715621ad330639c7c03ea5b280d6a7d1024029bb1125d1db1e
|
4
|
+
data.tar.gz: 48d33d13b9009d302de0b7cefa097e2891032ac8b961a803441776908b707531
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e446e54d2066969541b1ef5593aed989d1ff0b0d7228bf56ab61483dab1e52374bca34792c616930b689d1c684ab09694e49b07dce0b6e2bdc2d82de3504ebc
|
7
|
+
data.tar.gz: bc2877d15a9e06c3b105aa542da78f0497eee9bc81f26fd07867cef3f4be3d1b005060ff4e4d95133442cbd6b5edefb6adc39a4c04cb54fdcb8b91852de3036b
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
## future is unwritten (master)
|
2
2
|
|
3
|
+
* [#593](https://github.com/httprb/http/pull/593)
|
4
|
+
[#592](https://github.com/httprb/http/issues/592)
|
5
|
+
Support informational (1XX) responses.
|
6
|
+
([@ixti])
|
7
|
+
|
3
8
|
* [#590](https://github.com/httprb/http/pull/590)
|
4
9
|
[#589](https://github.com/httprb/http/issues/589)
|
5
10
|
Fix response headers paring.
|
data/README.md
CHANGED
data/lib/http/response/parser.rb
CHANGED
data/lib/http/version.rb
CHANGED
@@ -42,4 +42,33 @@ RSpec.describe HTTP::Response::Parser do
|
|
42
42
|
expect(subject.read(expected_body.size)).to eq(expected_body)
|
43
43
|
end
|
44
44
|
end
|
45
|
+
|
46
|
+
context "when got 100 Continue response" do
|
47
|
+
let :raw_response do
|
48
|
+
"HTTP/1.1 100 Continue\r\n\r\n" \
|
49
|
+
"HTTP/1.1 200 OK\r\n" \
|
50
|
+
"Content-Length: 12\r\n\r\n" \
|
51
|
+
"Hello World!"
|
52
|
+
end
|
53
|
+
|
54
|
+
context "when response is feeded in one part" do
|
55
|
+
let(:parts) { [raw_response] }
|
56
|
+
|
57
|
+
it "skips to next non-info response" do
|
58
|
+
expect(subject.status_code).to eq(200)
|
59
|
+
expect(subject.headers).to eq("Content-Length" => "12")
|
60
|
+
expect(subject.read(12)).to eq("Hello World!")
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
context "when response is feeded in many parts" do
|
65
|
+
let(:parts) { raw_response.split(//) }
|
66
|
+
|
67
|
+
it "skips to next non-info response" do
|
68
|
+
expect(subject.status_code).to eq(200)
|
69
|
+
expect(subject.headers).to eq("Content-Length" => "12")
|
70
|
+
expect(subject.read(12)).to eq("Hello World!")
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
45
74
|
end
|
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: 5.0.0.
|
4
|
+
version: 5.0.0.pre3
|
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: 2020-
|
14
|
+
date: 2020-02-26 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: addressable
|
@@ -187,7 +187,7 @@ metadata:
|
|
187
187
|
source_code_uri: https://github.com/httprb/http
|
188
188
|
wiki_uri: https://github.com/httprb/http/wiki
|
189
189
|
bug_tracker_uri: https://github.com/httprb/http/issues
|
190
|
-
changelog_uri: https://github.com/httprb/http/blob/v5.0.0.
|
190
|
+
changelog_uri: https://github.com/httprb/http/blob/v5.0.0.pre3/CHANGES.md
|
191
191
|
post_install_message:
|
192
192
|
rdoc_options: []
|
193
193
|
require_paths:
|
@@ -203,7 +203,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
203
|
- !ruby/object:Gem::Version
|
204
204
|
version: 1.3.1
|
205
205
|
requirements: []
|
206
|
-
|
206
|
+
rubyforge_project:
|
207
|
+
rubygems_version: 2.7.6.2
|
207
208
|
signing_key:
|
208
209
|
specification_version: 4
|
209
210
|
summary: HTTP should be easy
|