Fixes #22238
Change-Id: I8184f789bd4120f3e71c9374c7c2fcbfa95935bf
Reviewed-on: https://go-review.googlesource.com/132635
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
}
testRoundtrip := func(block Block) bool {
- if isBad(block.Type) {
+ // Reject bad Type
+ // Type with colons will proceed as key/val pair and cause an error.
+ if isBad(block.Type) || strings.Contains(block.Type, ":") {
return true
}
for key, val := range block.Headers {