File: lib/ruby-h2/frame-deserialiser.rb:50
The unpacked stream ID retains the reserved high bit from the wire. RFC 7540 §4.1 states the reserved bit "MUST be ignored when receiving."
A peer that sets this bit (even incorrectly) would produce a stream ID of e.g. 0x80000001 instead of 1, causing stream lookups to fail.
Fix: mask the stream ID after unpacking: sid &= 0x7FFF_FFFF.
File:
lib/ruby-h2/frame-deserialiser.rb:50The unpacked stream ID retains the reserved high bit from the wire. RFC 7540 §4.1 states the reserved bit "MUST be ignored when receiving."
A peer that sets this bit (even incorrectly) would produce a stream ID of e.g.
0x80000001instead of1, causing stream lookups to fail.Fix: mask the stream ID after unpacking:
sid &= 0x7FFF_FFFF.