From ae8bdd79e012ea8546d1f2103f86a4e46f88d420 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Wed, 19 Jul 2023 11:46:10 -0700 Subject: [PATCH] http3: use correct error code when request header parsing fails (#3979) --- http3/server.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/http3/server.go b/http3/server.go index 5c39ec04..3dd3d96b 100644 --- a/http3/server.go +++ b/http3/server.go @@ -573,8 +573,7 @@ func (s *Server) handleRequest(conn quic.Connection, str quic.Stream, decoder *q } req, err := requestFromHeaders(hfs) if err != nil { - // TODO: use the right error code - return newStreamError(ErrCodeGeneralProtocolError, err) + return newStreamError(ErrCodeMessageError, err) } connState := conn.ConnectionState().TLS