implement parsing and writing of RESET_STREAM_AT frames (#5155)

* implement parsing and writing of RESET_STREAM_AT frames

* wire: add support for parsing RESET_STREAM_AT frames
This commit is contained in:
Marten Seemann
2025-05-28 11:49:54 +08:00
committed by GitHub
parent eb7b7df1db
commit cb5c3f2aad
7 changed files with 271 additions and 292 deletions

View File

@@ -34,7 +34,7 @@ func Fuzz(data []byte) int {
encLevel := toEncLevel(data[0])
data = data[PrefixLen:]
parser := wire.NewFrameParser(true)
parser := wire.NewFrameParser(true, true)
parser.SetAckDelayExponent(protocol.DefaultAckDelayExponent)
var numFrames int
@@ -131,5 +131,9 @@ func validateFrame(frame wire.Frame) {
if f.IsApplicationError && f.FrameType != 0 {
panic("CONNECTION_CLOSE for an application error containing a frame type")
}
case *wire.ResetStreamFrame:
if f.FinalSize < f.ReliableSize {
panic("RESET_STREAM frame with a FinalSize smaller than the ReliableSize")
}
}
}