Merge pull request #482 from lucas-clemente/fix-479

send a HeadersStreamDataDecompressFailure error when H2 frame parsing fails
This commit is contained in:
Marten Seemann
2017-03-15 17:15:21 +07:00
committed by GitHub
6 changed files with 13 additions and 6 deletions

View File

@@ -111,7 +111,7 @@ func (c *Client) handleHeaderStream() {
for {
frame, err := h2framer.ReadFrame()
if err != nil {
c.headerErr = qerr.Error(qerr.InvalidStreamData, "cannot read frame")
c.headerErr = qerr.Error(qerr.HeadersStreamDataDecompressFailure, "cannot read frame")
break
}
lastStream = protocol.StreamID(frame.Header().StreamID)