diff --git a/internal/wire/header.go b/internal/wire/header.go index 21eb784c..80519829 100644 --- a/internal/wire/header.go +++ b/internal/wire/header.go @@ -208,10 +208,10 @@ func (h *Header) parseLongHeader(b *bytes.Reader) error { func (h *Header) parseVersionNegotiationPacket(b *bytes.Reader) error { if b.Len() == 0 { - return errors.New("Version Negoation packet has empty version list") + return errors.New("Version Negotiation packet has empty version list") } if b.Len()%4 != 0 { - return errors.New("Version Negotation packet has a version list with an invalid length") + return errors.New("Version Negotiation packet has a version list with an invalid length") } h.SupportedVersions = make([]protocol.VersionNumber, b.Len()/4) for i := 0; b.Len() > 0; i++ { diff --git a/internal/wire/header_test.go b/internal/wire/header_test.go index e9ef160d..245e3bc7 100644 --- a/internal/wire/header_test.go +++ b/internal/wire/header_test.go @@ -137,7 +137,7 @@ var _ = Describe("Header Parsing", func() { data, err := ComposeVersionNegotiation(connID, connID, versions) Expect(err).ToNot(HaveOccurred()) _, _, _, err = ParsePacket(data[:len(data)-2], 0) - Expect(err).To(MatchError("Version Negotation packet has a version list with an invalid length")) + Expect(err).To(MatchError("Version Negotiation packet has a version list with an invalid length")) }) It("errors if the version list is empty", func() { @@ -148,7 +148,7 @@ var _ = Describe("Header Parsing", func() { // remove 8 bytes (two versions), since ComposeVersionNegotiation also added a reserved version number data = data[:len(data)-8] _, _, _, err = ParsePacket(data, 0) - Expect(err).To(MatchError("Version Negoation packet has empty version list")) + Expect(err).To(MatchError("Version Negotiation packet has empty version list")) }) })