No part imports config (closes #447) #470
@@ -883,8 +883,11 @@ func TestHeaderNameCheckTakesTheRFC9110Characters(t *testing.T) {
|
||||
want := 'a' <= char && char <= 'z' || 'A' <= char && char <= 'Z' ||
|
||||
'0' <= char && char <= '9' || strings.IndexByte(marks, char) >= 0
|
||||
|
||||
if got := httpguts.ValidHeaderFieldName(string(char)); got != want {
|
||||
t.Errorf("the name %q is taken: %t, want %t", char, got, want)
|
||||
// string(char) would be the UTF-8 of U+0080 to U+00FF, two bytes,
|
||||
// for a byte above 0x7f.
|
||||
name := string([]byte{char})
|
||||
if got := httpguts.ValidHeaderFieldName(name); got != want {
|
||||
t.Errorf("the name %q is taken: %t, want %t", name, got, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user