protocol-http1 0.14.0 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of protocol-http1 might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/protocol/http1/body/chunked.rb +7 -2
- data/lib/protocol/http1/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 884c811e792417717ddccec3f8369607dcc46ede6951557c567a08b3fa7d434e
|
4
|
+
data.tar.gz: 262f7ef658565c295964266c1eef6ff78464d39f7b7fa40bee7f44032d839570
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c991118f30f922938caa5a83f05d91f9f627c0fb5cdf6525aa08e7c559340514b571c636ae7e4048b951848fc2f4d481388901cfd6b3b42c0d0312aa00a51bf
|
7
|
+
data.tar.gz: 5f2e2cdb7b248fc83bd73d43b1e39102bd96663185994758b09d512adafabd59368e344ed38f472170bbac960a9d2386ad9d9e32ec01bb1fb05d0107f5bf509e
|
@@ -56,6 +56,7 @@ module Protocol
|
|
56
56
|
def read
|
57
57
|
return nil if @finished
|
58
58
|
|
59
|
+
# It is possible this line contains chunk extension, so we use `to_i` to only consider the initial integral part:
|
59
60
|
length = read_line.to_i(16)
|
60
61
|
|
61
62
|
if length == 0
|
@@ -84,12 +85,16 @@ module Protocol
|
|
84
85
|
|
85
86
|
private
|
86
87
|
|
87
|
-
def read_line
|
88
|
+
def read_line?
|
88
89
|
@stream.gets(CRLF, chomp: true)
|
89
90
|
end
|
90
91
|
|
92
|
+
def read_line
|
93
|
+
read_line? or raise EOFError
|
94
|
+
end
|
95
|
+
|
91
96
|
def read_trailer
|
92
|
-
while line = read_line
|
97
|
+
while line = read_line?
|
93
98
|
# Empty line indicates end of trailer:
|
94
99
|
break if line.empty?
|
95
100
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protocol-http1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: protocol-http
|
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
- !ruby/object:Gem::Version
|
128
128
|
version: '0'
|
129
129
|
requirements: []
|
130
|
-
rubygems_version: 3.
|
130
|
+
rubygems_version: 3.2.3
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: A low level implementation of the HTTP/1 protocol.
|