reject DATAGRAM frames if datagram support is not enabled

This commit is contained in:
Marten Seemann 2019-10-06 17:50:27 +02:00
parent 913ddc5081
commit fd41e8fa62
7 changed files with 38 additions and 11 deletions

View file

@ -39,7 +39,7 @@ var _ = Describe("Streams Map (incoming)", func() {
checkFrameSerialization := func(f wire.Frame) {
b := &bytes.Buffer{}
ExpectWithOffset(1, f.Write(b, protocol.VersionTLS)).To(Succeed())
frame, err := wire.NewFrameParser(protocol.VersionTLS).ParseNext(bytes.NewReader(b.Bytes()), protocol.Encryption1RTT)
frame, err := wire.NewFrameParser(false, protocol.VersionTLS).ParseNext(bytes.NewReader(b.Bytes()), protocol.Encryption1RTT)
ExpectWithOffset(1, err).ToNot(HaveOccurred())
Expect(f).To(Equal(frame))
}