We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae2dfcc commit d13431cCopy full SHA for d13431c
src/net/http/serve_test.go
@@ -6189,6 +6189,7 @@ func TestUnsupportedTransferEncodingsReturn501(t *testing.T) {
6189
"fugazi",
6190
"foo-bar",
6191
"unknown",
6192
+ "\rchunked",
6193
}
6194
6195
for _, badTE := range unsupportedTEs {
src/net/http/transfer.go
@@ -639,7 +639,7 @@ func (t *transferReader) parseTransferEncoding() error {
639
if len(raw) != 1 {
640
return &unsupportedTEError{fmt.Sprintf("too many transfer encodings: %q", raw)}
641
642
- if !ascii.EqualFold(textproto.TrimString(raw[0]), "chunked") {
+ if !ascii.EqualFold(raw[0], "chunked") {
643
return &unsupportedTEError{fmt.Sprintf("unsupported transfer encoding: %q", raw[0])}
644
645
0 commit comments