send a HeadersStreamDataDecompressFailure error when H2 frame parsing fails

fixes #479
This commit is contained in:
Marten Seemann
2017-03-15 11:11:38 +07:00
parent 0a825a397d
commit 7f416a06c4
6 changed files with 13 additions and 6 deletions

View File

@@ -110,7 +110,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)