forked from quic-go/quic-go
Merge pull request #3213 from lucas-clemente/remove-retire-bug-compat-mode
remove the RetireBugBackwardsCompatibilityMode
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user