Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/protocol/http2/goaway_frame.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def unpack
data = super

last_stream_id, error_code = data.unpack(FORMAT)
last_stream_id &= 0x7fffffff

return last_stream_id, error_code, data.slice(8, data.bytesize-8)
end
Expand Down
4 changes: 4 additions & 0 deletions releases.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Releases

## Unreleased

- Ignore the reserved high bit when decoding GOAWAY last stream IDs.

## v0.26.1

- Improve `StreamError` messages for HTTP/2 stream reset error codes.
Expand Down
6 changes: 6 additions & 0 deletions test/protocol/http2/goaway_frame.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,11 @@ def before

expect(frame.unpack).to be == [3, 2, data]
end

it "ignores the reserved high bit of the last stream id" do
frame.pack 0x80000003, 2, data

expect(frame.unpack).to be == [3, 2, data]
end
end
end
Loading