diff --git a/public_header.go b/public_header.go index f55a0507e..fdcbe9354 100644 --- a/public_header.go +++ b/public_header.go @@ -22,7 +22,7 @@ type PublicHeader struct { // WritePublicHeader writes a public header func (h *PublicHeader) WritePublicHeader(b *bytes.Buffer) error { - publicFlagByte := uint8(0x0C | 0x20) + publicFlagByte := uint8(0x3c) if h.VersionFlag && h.ResetFlag { return errors.New("Reset Flag and Version Flag should not be set at the same time") } diff --git a/public_header_test.go b/public_header_test.go index 48ca81e38..af319b88b 100644 --- a/public_header_test.go +++ b/public_header_test.go @@ -79,7 +79,7 @@ var _ = Describe("Public Header", func() { PacketNumber: 2, } publicHeader.WritePublicHeader(b) - Expect(b.Bytes()).To(Equal([]byte{0x2c, 0xf6, 0x19, 0x86, 0x66, 0x9b, 0x9f, 0xfa, 0x4c, 2, 0, 0, 0, 0, 0})) + Expect(b.Bytes()).To(Equal([]byte{0x3c, 0xf6, 0x19, 0x86, 0x66, 0x9b, 0x9f, 0xfa, 0x4c, 2, 0, 0, 0, 0, 0})) }) It("sets the Version Flag", func() { diff --git a/server_test.go b/server_test.go index cb22726be..6802d3b95 100644 --- a/server_test.go +++ b/server_test.go @@ -43,7 +43,7 @@ var _ = Describe("Server", func() { It("composes version negotiation packets", func() { expected := append( - []byte{0x2d, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0}, + []byte{0x3d, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0}, protocol.SupportedVersionsAsTags..., ) Expect(composeVersionNegotiation(1)).To(Equal(expected)) @@ -85,7 +85,7 @@ var _ = Describe("Server", func() { Expect(err2).ToNot(HaveOccurred()) data = data[:n] expected := append( - []byte{0x2d, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0}, + []byte{0x3d, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0}, protocol.SupportedVersionsAsTags..., ) Expect(data).To(Equal(expected))