forked from quic-go/quic-go
move the unencrypted STREAM frame check from the unpacker to the session
This commit is contained in:
@@ -2,7 +2,6 @@ package quic
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/wire"
|
||||
@@ -49,11 +48,6 @@ func (u *packetUnpacker) Unpack(headerBinary []byte, hdr *wire.Header, data []by
|
||||
if frame == nil {
|
||||
break
|
||||
}
|
||||
if sf, ok := frame.(*wire.StreamFrame); ok {
|
||||
if sf.StreamID != u.version.CryptoStreamID() && encryptionLevel <= protocol.EncryptionUnencrypted {
|
||||
return nil, qerr.Error(qerr.UnencryptedStreamData, fmt.Sprintf("received unencrypted stream data on stream %d", sf.StreamID))
|
||||
}
|
||||
}
|
||||
fs = append(fs, frame)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user