analyzer: make http3/quic handling more reliable
This commit is contained in:
@@ -56,3 +56,13 @@ func TestQuicStreamParsing_ClientHello(t *testing.T) {
|
||||
t.Errorf("%d B parsed = %v, want %v", len(clientHello), got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestQuicStreamContiguousPayloadFromZero(t *testing.T) {
|
||||
s := &quicStream{}
|
||||
s.mergeFrame(3, []byte("de"))
|
||||
s.mergeFrame(0, []byte("abc"))
|
||||
got := s.contiguousPayloadFromZero()
|
||||
if string(got) != "abcde" {
|
||||
t.Fatalf("contiguousPayloadFromZero() = %q, want %q", string(got), "abcde")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user