protocol-http1 0.35.2 → 0.37.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4bf3ffc440b97d40277fdf64e1962d31edb93d808fc6a3059234af3b8be6e9c0
4
- data.tar.gz: 9495d1bf263831872363193cbe2dab89775c57d503eacbb74bd83dffe7863f8e
3
+ metadata.gz: b8ed289fdd31ce464d53ec0d87533f948cb000c05a966a53280f0d666a3f61e8
4
+ data.tar.gz: 88b8c7cd528012574849c4a221a6040139f884355affeebb8e1b9fd1666b69a2
5
5
  SHA512:
6
- metadata.gz: 549410520376936764b4c55653bcc2bc30fd770fa63c3befeb634d6e909be02ce94dd8a11c0823a46a9de106fb6d3fce03eeacc03066e0a100aa797328641f80
7
- data.tar.gz: f0d72eb0d29c2e9d97fe725e53da409c5dbd0352df6575d44a27bab6a4d55fef929eb8a72adc0d484cb471479b383f425541881996c229f31ab2703b055ebb94
6
+ metadata.gz: d21bc4fbd87fcb529f4eb367ce740fa31389f352dc7c9e5739e07be8b75c0233f97efdd28f8f9dffaa58c9fb482625c4c176eaae7b61ca1d38e665212a709128
7
+ data.tar.gz: 6d2784704a5e2a54f0ab742daf0514c14989bedd9578226d7ac74c6416deefa30c59e8bf7e0e715275c340ff6c7bd92275d9444918a21f799c4e899b695c844c
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2025, by Samuel Williams.
4
+ # Copyright, 2019-2026, by Samuel Williams.
5
5
  # Copyright, 2023, by Thomas Morgan.
6
6
 
7
7
  require "protocol/http/body/readable"
@@ -137,7 +137,7 @@ module Protocol
137
137
  break if line.empty?
138
138
 
139
139
  if match = line.match(HEADER)
140
- @headers.add(match[1], match[2])
140
+ @headers.add(match[1], match[2], trailer: true)
141
141
  else
142
142
  raise BadHeader, "Could not parse header: #{line.inspect}"
143
143
  end
@@ -21,6 +21,7 @@ module Protocol
21
21
 
22
22
  # The request was not able to be parsed correctly, or failed some kind of validation.
23
23
  class BadRequest < Error
24
+ include Protocol::HTTP::BadRequest
24
25
  end
25
26
 
26
27
  # A header name or value was invalid, e.g. contains invalid characters.
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Protocol
7
7
  module HTTP1
8
- VERSION = "0.35.2"
8
+ VERSION = "0.37.0"
9
9
  end
10
10
  end
data/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2019-2025, by Samuel Williams.
3
+ Copyright, 2019-2026, by Samuel Williams.
4
4
  Copyright, 2019, by Brian Morearty.
5
5
  Copyright, 2020, by Olle Jonsson.
6
6
  Copyright, 2020, by Bruno Sutic.
data/readme.md CHANGED
@@ -9,7 +9,7 @@ Provides a low-level implementation of the HTTP/1 protocol.
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ``` ruby
12
- gem 'protocol-http1'
12
+ gem "protocol-http1"
13
13
  ```
14
14
 
15
15
  And then execute:
@@ -30,6 +30,14 @@ Please see the [project documentation](https://socketry.github.io/protocol-http1
30
30
 
31
31
  Please see the [project releases](https://socketry.github.io/protocol-http1/releases/index) for all releases.
32
32
 
33
+ ### v0.37.0
34
+
35
+ - `Protocol::HTTP1::BadRequest` now includes `Protocol::HTTP::BadRequest` for better interoperability and handling of bad request errors across different HTTP protocol implementations.
36
+
37
+ ### v0.36.0
38
+
39
+ - Indicate trailers from chunked body for better validation by `Protocol::HTTP::Headers`.
40
+
33
41
  ### v0.35.2
34
42
 
35
43
  - Tidy up implementation of `read_line?` to handle line length errors and protocol violations more clearly.
@@ -65,14 +73,6 @@ Please see the [project releases](https://socketry.github.io/protocol-http1/rele
65
73
 
66
74
  - Make `authority` header optional in HTTP requests for improved flexibility.
67
75
 
68
- ### v0.29.0
69
-
70
- - Add block/yield interface to `read_request` and `read_response` methods.
71
-
72
- ### v0.28.1
73
-
74
- - Fix handling of `nil` lines in HTTP parsing.
75
-
76
76
  ## Contributing
77
77
 
78
78
  We welcome contributions to this project.
data/releases.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Releases
2
2
 
3
+ ## v0.37.0
4
+
5
+ - `Protocol::HTTP1::BadRequest` now includes `Protocol::HTTP::BadRequest` for better interoperability and handling of bad request errors across different HTTP protocol implementations.
6
+
7
+ ## v0.36.0
8
+
9
+ - Indicate trailers from chunked body for better validation by `Protocol::HTTP::Headers`.
10
+
3
11
  ## v0.35.2
4
12
 
5
13
  - Tidy up implementation of `read_line?` to handle line length errors and protocol violations more clearly.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-http1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.35.2
4
+ version: 0.37.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -49,14 +49,14 @@ dependencies:
49
49
  requirements:
50
50
  - - "~>"
51
51
  - !ruby/object:Gem::Version
52
- version: '0.22'
52
+ version: '0.58'
53
53
  type: :runtime
54
54
  prerelease: false
55
55
  version_requirements: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
- version: '0.22'
59
+ version: '0.58'
60
60
  executables: []
61
61
  extensions: []
62
62
  extra_rdoc_files: []
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  requirements: []
100
- rubygems_version: 3.6.9
100
+ rubygems_version: 4.0.3
101
101
  specification_version: 4
102
102
  summary: A low level implementation of the HTTP/1 protocol.
103
103
  test_files: []
metadata.gz.sig CHANGED
Binary file