We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20760cf commit e5017a9Copy full SHA for e5017a9
src/net/http/serve_test.go
@@ -6245,6 +6245,7 @@ func TestUnsupportedTransferEncodingsReturn501(t *testing.T) {
6245
"fugazi",
6246
"foo-bar",
6247
"unknown",
6248
+ "\rchunked",
6249
}
6250
6251
for _, badTE := range unsupportedTEs {
src/net/http/transfer.go
@@ -642,7 +642,7 @@ func (t *transferReader) parseTransferEncoding() error {
642
if len(raw) != 1 {
643
return &unsupportedTEError{fmt.Sprintf("too many transfer encodings: %q", raw)}
644
645
- if !ascii.EqualFold(textproto.TrimString(raw[0]), "chunked") {
+ if !ascii.EqualFold(raw[0], "chunked") {
646
return &unsupportedTEError{fmt.Sprintf("unsupported transfer encoding: %q", raw[0])}
647
648
0 commit comments