analyzer: make http3/quic handling more reliable
This commit is contained in:
@@ -55,3 +55,14 @@ func TestExtractCryptoFrames_UnknownAfterCrypto(t *testing.T) {
|
||||
t.Fatalf("frame0 = %+v, want offset=0 data=abc", frames[0])
|
||||
}
|
||||
}
|
||||
|
||||
func TestReadCryptoFrames_NonInitialHeader(t *testing.T) {
|
||||
// Short header packet marker should be rejected as non-initial.
|
||||
_, err := ReadCryptoFrames([]byte{0x40, 0x01, 0x02, 0x03, 0x04})
|
||||
if err == nil {
|
||||
t.Fatal("ReadCryptoFrames() error = nil, want non-nil")
|
||||
}
|
||||
if err.Error() != ErrNotInitialPacket.Error() {
|
||||
t.Fatalf("ReadCryptoFrames() error = %v, want %v", err, ErrNotInitialPacket)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user