forked from quic-go/quic-go
Handle new version format
This commit is contained in:
@@ -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)
|
||||
})
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user