]> Cypherpunks repositories - gostls13.git/commit
net/http: make Server return 501 for unsupported transfer-encodings
authorEmmanuel T Odeke <emmanuel@orijtech.com>
Mon, 11 Mar 2019 22:52:20 +0000 (15:52 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 30 Apr 2019 19:23:58 +0000 (19:23 +0000)
commit88548d0211ba64896fa76a5d1818e4422847a879
treef68666e73419b36bb21eff92f43acf3b5e66cab0
parentc66ab9b18224738e29e838e79b5875536e05fc6d
net/http: make Server return 501 for unsupported transfer-encodings

Ensures that our HTTP/1.X Server properly responds
with a 501 Unimplemented as mandated by the spec at
RFC 7230 Section 3.3.1, which says:
    A server that receives a request message with a
    transfer coding it does not understand SHOULD
    respond with 501 (Unimplemented).

Fixes #30710

Change-Id: I096904e6df053cd1e4b551774cc27523ff3d09f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/167017
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/net/http/serve_test.go
src/net/http/server.go
src/net/http/transfer.go
src/net/http/transfer_test.go