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

update HTTP/3 Datagram to draft-ietf-masque-h3-datagram-07 #3355

Merged
merged 1 commit into from
Mar 25, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions http3/error_codes.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const (
errorMessageError errorCode = 0x10e
errorConnectError errorCode = 0x10f
errorVersionFallback errorCode = 0x110
errorDatagramError errorCode = 0x4a1268
)

func (e errorCode) String() string {
Expand Down Expand Up @@ -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))
}
Expand Down
2 changes: 1 addition & 1 deletion http3/frames.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion http3/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down