diff --git a/http/httpguts/httplex.go b/http/httpguts/httplex.go index e7de24ee6..3b8ab2d1e 100644 --- a/http/httpguts/httplex.go +++ b/http/httpguts/httplex.go @@ -14,6 +14,8 @@ import ( var isTokenTable = [127]bool{ '!': true, + '[': true, + ']': true, '#': true, '$': true, '%': true, diff --git a/http/httpguts/httplex_test.go b/http/httpguts/httplex_test.go index a2c57f392..2353cb538 100644 --- a/http/httpguts/httplex_test.go +++ b/http/httpguts/httplex_test.go @@ -14,7 +14,7 @@ func isCtl(c rune) bool { return c <= 31 || c == 127 } func isSeparator(c rune) bool { switch c { - case '(', ')', '<', '>', '@', ',', ';', ':', '\\', '"', '/', '[', ']', '?', '=', '{', '}', ' ', '\t': + case '(', ')', '<', '>', '@', ',', ';', ':', '\\', '"', '/', '?', '=', '{', '}', ' ', '\t': return true } return false