Skip to content

Commit 78de9c9

Browse files
author
Bartłomiej Kiełbasa
committed
allows brackets in cookie name
1 parent 312bce6 commit 78de9c9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

http/httpguts/httplex.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import (
1414

1515
var isTokenTable = [127]bool{
1616
'!': true,
17+
'[': true,
18+
']': true,
1719
'#': true,
1820
'$': true,
1921
'%': true,

http/httpguts/httplex_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func isCtl(c rune) bool { return c <= 31 || c == 127 }
1414

1515
func isSeparator(c rune) bool {
1616
switch c {
17-
case '(', ')', '<', '>', '@', ',', ';', ':', '\\', '"', '/', '[', ']', '?', '=', '{', '}', ' ', '\t':
17+
case '(', ')', '<', '>', '@', ',', ';', ':', '\\', '"', '/', '?', '=', '{', '}', ' ', '\t':
1818
return true
1919
}
2020
return false

0 commit comments

Comments
 (0)