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 93aab18 commit 222ee24Copy full SHA for 222ee24
src/net/http/serve_test.go
@@ -6250,6 +6250,7 @@ func TestUnsupportedTransferEncodingsReturn501(t *testing.T) {
6250
"fugazi",
6251
"foo-bar",
6252
"unknown",
6253
+ "\rchunked",
6254
}
6255
6256
for _, badTE := range unsupportedTEs {
src/net/http/transfer.go
@@ -640,7 +640,7 @@ func (t *transferReader) parseTransferEncoding() error {
640
if len(raw) != 1 {
641
return &unsupportedTEError{fmt.Sprintf("too many transfer encodings: %q", raw)}
642
643
- if !ascii.EqualFold(textproto.TrimString(raw[0]), "chunked") {
+ if !ascii.EqualFold(raw[0], "chunked") {
644
return &unsupportedTEError{fmt.Sprintf("unsupported transfer encoding: %q", raw[0])}
645
646
0 commit comments