diff --git a/http3/server_test.go b/http3/server_test.go index fdc882f9..eec52ad3 100644 --- a/http3/server_test.go +++ b/http3/server_test.go @@ -339,7 +339,7 @@ var _ = Describe("Server", func() { } BeforeEach(func() { - Expect(getExpectedHeader([]protocol.VersionNumber{99, 90, 9})).To(Equal(http.Header{"Alt-Svc": {nextProtoH3 + `=":443"; ma=2592000; quic="99,90,9"`}})) + Expect(getExpectedHeader([]protocol.VersionNumber{0x00000001, 0x1abadaba})).To(Equal(http.Header{"Alt-Svc": {nextProtoH3 + `=":443"; ma=2592000; quic="1,1abadaba"`}})) expected = getExpectedHeader(protocol.SupportedVersions) }) diff --git a/internal/protocol/version.go b/internal/protocol/version.go index 3406cfa4..69ccbe48 100644 --- a/internal/protocol/version.go +++ b/internal/protocol/version.go @@ -50,7 +50,7 @@ func (vn VersionNumber) String() string { // ToAltSvc returns the representation of the version for the H2 Alt-Svc parameters func (vn VersionNumber) ToAltSvc() string { - return fmt.Sprintf("%d", vn) + return fmt.Sprintf("%x", uint32(vn)) } func (vn VersionNumber) isGQUIC() bool {