remove the RetireBugBackwardsCompatibilityMode

This commit is contained in:
Marten Seemann
2021-06-26 15:49:02 -07:00
parent e9d12b7f83
commit b2857b5442
5 changed files with 1 additions and 48 deletions

View File

@@ -72,12 +72,6 @@ func (vn VersionNumber) toGQUICVersion() int {
return int(10*(vn-gquicVersion0)/0x100) + int(vn%0x10)
}
// UseRetireBugBackwardsCompatibilityMode says if it is necessary to use the backwards compatilibity mode.
// This is only the case if it 1. is enabled and 2. draft-29 is used.
func UseRetireBugBackwardsCompatibilityMode(enabled bool, v VersionNumber) bool {
return enabled && v == VersionDraft29
}
// IsSupportedVersion returns true if the server supports this version
func IsSupportedVersion(supported []VersionNumber, v VersionNumber) bool {
for _, t := range supported {

View File

@@ -53,13 +53,6 @@ var _ = Describe("Version", func() {
}
})
It("says if backwards compatibility mode should be used", func() {
Expect(UseRetireBugBackwardsCompatibilityMode(true, VersionDraft29)).To(BeTrue())
Expect(UseRetireBugBackwardsCompatibilityMode(true, VersionDraft32)).To(BeFalse())
Expect(UseRetireBugBackwardsCompatibilityMode(false, VersionDraft29)).To(BeFalse())
Expect(UseRetireBugBackwardsCompatibilityMode(false, VersionDraft32)).To(BeFalse())
})
Context("highest supported version", func() {
It("finds the supported version", func() {
supportedVersions := []VersionNumber{1, 2, 3}