]> Cypherpunks repositories - gostls13.git/commit
net/textproto: skip zero-length keys
authorJeff R. Allen <jra@nella.org>
Thu, 18 Jun 2015 12:28:54 +0000 (14:28 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 22 Jun 2015 02:48:27 +0000 (02:48 +0000)
commit626188dd314c26746ad5525721875ac72ee49c9e
treec52aea650e3676e6e865df3bd9bee326175731cd
parent3cab4760d5ce8108c88984cb6c9849e598882b9b
net/textproto: skip zero-length keys

A header of ": value" results in an empty key. Do not add
it to the headers, because RFC7230 (section 3.2) says that
field-names are tokens, which are one or more characters.

Fixes #11205.

Change-Id: I883be89da1489dc84f98523786b019d1d0169d46
Reviewed-on: https://go-review.googlesource.com/11242
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/textproto/reader.go
src/net/textproto/reader_test.go