protocol-http1 0.14.0 → 0.14.1

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.

Potentially problematic release.


This version of protocol-http1 might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 972a37dfc7d2658f54c796f85054bec8bdb2827e595a42b874d276d320015aa7
4
- data.tar.gz: d50ec1a04e61727cb104e7d1224e90bd8c4dc63f41e71854b2376463456ee8ba
3
+ metadata.gz: 884c811e792417717ddccec3f8369607dcc46ede6951557c567a08b3fa7d434e
4
+ data.tar.gz: 262f7ef658565c295964266c1eef6ff78464d39f7b7fa40bee7f44032d839570
5
5
  SHA512:
6
- metadata.gz: d19773f15978c311cfba29096fdf6026279c04ee458db6492811368f9251cd54cb697db12f06f748d3130308cf91341a0377933a8c57f07dfceb805380212da1
7
- data.tar.gz: 2b804b15e98404899673468bc63f35adf3417d0e6a31e54e3cb77d262c65918242b062de9fa72e302c5b99403482ff1b8f5ec3ce43bf0bb43215d21d0dd91cac
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
 
@@ -22,6 +22,6 @@
22
22
 
23
23
  module Protocol
24
24
  module HTTP1
25
- VERSION = "0.14.0"
25
+ VERSION = "0.14.1"
26
26
  end
27
27
  end
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.0
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-04-23 00:00:00.000000000 Z
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.1.2
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.