Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http3: change code point for HTTP datagrams to RFC 9297 #3588

Merged
merged 2 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion http3/error_codes.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const (
ErrCodeMessageError ErrCode = 0x10e
ErrCodeConnectError ErrCode = 0x10f
ErrCodeVersionFallback ErrCode = 0x110
ErrCodeDatagramError ErrCode = 0x4a1268
ErrCodeDatagramError ErrCode = 0x33
)

func (e ErrCode) String() string {
Expand Down
2 changes: 1 addition & 1 deletion http3/frames.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (f *headersFrame) Append(b []byte) []byte {
return quicvarint.Append(b, f.Length)
}

const settingDatagram = 0xffd277
const settingDatagram = 0x33

type settingsFrame struct {
Datagram bool
Expand Down
2 changes: 1 addition & 1 deletion http3/roundtrip.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type RoundTripper 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/rfc9297.
EnableDatagrams bool

// Additional HTTP/3 settings.
Expand Down
2 changes: 1 addition & 1 deletion http3/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ type Server struct {

// EnableDatagrams enables support for HTTP/3 datagrams.
// If set to true, QuicConfig.EnableDatagram will be set.
// See https://datatracker.ietf.org/doc/html/draft-ietf-masque-h3-datagram-07.
// See https://datatracker.ietf.org/doc/html/rfc9297.
EnableDatagrams bool

// MaxHeaderBytes controls the maximum number of bytes the server will
Expand Down