From a477ef1b4f75e54bde8d7bcb0b839dafa57f7ef8 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Tue, 22 Mar 2022 22:04:55 +0100 Subject: [PATCH] update HTTP/3 Datagram to draft-ietf-masque-h3-datagram-07 --- http3/error_codes.go | 3 +++ http3/frames.go | 2 +- http3/server.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/http3/error_codes.go b/http3/error_codes.go index dfde76d4326..d87eef4ae07 100644 --- a/http3/error_codes.go +++ b/http3/error_codes.go @@ -26,6 +26,7 @@ const ( errorMessageError errorCode = 0x10e errorConnectError errorCode = 0x10f errorVersionFallback errorCode = 0x110 + errorDatagramError errorCode = 0x4a1268 ) func (e errorCode) String() string { @@ -64,6 +65,8 @@ func (e errorCode) String() string { return "H3_CONNECT_ERROR" case errorVersionFallback: return "H3_VERSION_FALLBACK" + case errorDatagramError: + return "H3_DATAGRAM_ERROR" default: return fmt.Sprintf("unknown error code: %#x", uint16(e)) } diff --git a/http3/frames.go b/http3/frames.go index e096ac1a8c4..f870275a599 100644 --- a/http3/frames.go +++ b/http3/frames.go @@ -68,7 +68,7 @@ func (f *headersFrame) Write(b *bytes.Buffer) { quicvarint.Write(b, f.Length) } -const settingDatagram = 0x276 +const settingDatagram = 0xffd277 type settingsFrame struct { Datagram bool diff --git a/http3/server.go b/http3/server.go index 9b5b6a64203..c5629a7ed2d 100644 --- a/http3/server.go +++ b/http3/server.go @@ -131,7 +131,7 @@ type Server struct { // Enable support for HTTP/3 datagrams. // If set to true, QuicConfig.EnableDatagram will be set. - // See https://www.ietf.org/archive/id/draft-schinazi-masque-h3-datagram-02.html. + // See https://datatracker.ietf.org/doc/html/draft-ietf-masque-h3-datagram-07. EnableDatagrams bool // The port to use in Alt-Svc response headers.