Skip to content

Commit 0719d95

Browse files
committed
Indicate trailers from chunked body.
1 parent 5b2149c commit 0719d95

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

lib/protocol/http1/body/chunked.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def read_trailer
137137
break if line.empty?
138138

139139
if match = line.match(HEADER)
140-
@headers.add(match[1], match[2])
140+
@headers.add(match[1], match[2], trailer: true)
141141
else
142142
raise BadHeader, "Could not parse header: #{line.inspect}"
143143
end

protocol-http1.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ Gem::Specification.new do |spec|
2424

2525
spec.required_ruby_version = ">= 3.2"
2626

27-
spec.add_dependency "protocol-http", "~> 0.22"
27+
spec.add_dependency "protocol-http", "~> 0.58"
2828
end

releases.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Releases
22

3+
## Unreleased
4+
5+
- Indicate trailers from chunked body for better validation by `Protocol::HTTP::Headers`.
6+
37
## v0.35.2
48

59
- Tidy up implementation of `read_line?` to handle line length errors and protocol violations more clearly.

0 commit comments

Comments
 (0)