allow 0-RTT when the server's connection receive limit is increased

This commit is contained in:
Marten Seemann 2021-03-17 18:45:56 +08:00
parent 6c3876d6b3
commit 31ac5ca60d
4 changed files with 81 additions and 68 deletions

View file

@ -528,11 +528,16 @@ var _ = Describe("Transport Parameters", func() {
Expect(p.ValidFor0RTT(saved)).To(BeTrue())
})
It("rejects the parameters if the InitialMaxData changed", func() {
p.InitialMaxData = 0
It("rejects the parameters if the InitialMaxData was reduced", func() {
p.InitialMaxData = saved.InitialMaxData - 1
Expect(p.ValidFor0RTT(saved)).To(BeFalse())
})
It("doesn't reject the parameters if the InitialMaxData was increased", func() {
p.InitialMaxData = saved.InitialMaxData + 1
Expect(p.ValidFor0RTT(saved)).To(BeTrue())
})
It("rejects the parameters if the MaxBidiStreamNum was reduced", func() {
p.MaxBidiStreamNum = saved.MaxBidiStreamNum - 1
Expect(p.ValidFor0RTT(saved)).To(BeFalse())