Fix alt-svc header

This commit is contained in:
Julien Salleyron
2019-10-12 18:46:01 +02:00
parent 594b2748b2
commit ff89d42262
2 changed files with 3 additions and 3 deletions

View File

@@ -334,12 +334,12 @@ var _ = Describe("Server", func() {
versionsAsString = append(versionsAsString, v.ToAltSvc())
}
return http.Header{
"Alt-Svc": {fmt.Sprintf(`quic=":443"; ma=2592000; v="%s"`, strings.Join(versionsAsString, ","))},
"Alt-Svc": {fmt.Sprintf(`%s=":443"; ma=2592000; quic="%s"`, nextProtoH3, strings.Join(versionsAsString, ","))},
}
}
BeforeEach(func() {
Expect(getExpectedHeader([]protocol.VersionNumber{99, 90, 9})).To(Equal(http.Header{"Alt-Svc": {`quic=":443"; ma=2592000; v="99,90,9"`}}))
Expect(getExpectedHeader([]protocol.VersionNumber{99, 90, 9})).To(Equal(http.Header{"Alt-Svc": {nextProtoH3 + `=":443"; ma=2592000; quic="99,90,9"`}}))
expected = getExpectedHeader(protocol.SupportedVersions)
})