update HTTP/3 errors

* rename HTTP_UNEXPECTED_FRAME to HTTP_FRAME_UNEXPECTED
* remove the HTTP_WRONG_STREAM error
* rename errors from HTTP_ to H3_
This commit is contained in:
Marten Seemann
2019-10-23 09:40:19 +07:00
parent 4af8a33c3f
commit ea0050e2a2
6 changed files with 33 additions and 36 deletions

View File

@@ -204,7 +204,7 @@ func (c *client) doRequest(
}
hf, ok := frame.(*headersFrame)
if !ok {
return nil, newConnError(errorUnexpectedFrame, errors.New("expected first frame to be a HEADERS frame"))
return nil, newConnError(errorFrameUnexpected, errors.New("expected first frame to be a HEADERS frame"))
}
if hf.Length > c.maxHeaderBytes() {
return nil, newStreamError(errorFrameError, fmt.Errorf("HEADERS frame too large: %d bytes (max: %d)", hf.Length, c.maxHeaderBytes()))