diff options
| author | Dave Cheney <dave@cheney.net> | 2011-08-25 14:00:00 +0400 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2011-08-25 14:00:00 +0400 |
| commit | 8511ed454a40f861e1b2aac6acbe6d6aa8325bf3 (patch) | |
| tree | 9c9d0c7171a5cd341d2587c717307b8f1bed985d /src/pkg/http/server.go | |
| parent | 1f0d277cc1bfac5a92432f645c6a504a17dabce0 (diff) | |
| download | go-8511ed454a40f861e1b2aac6acbe6d6aa8325bf3.tar.xz | |
http: return 413 instead of 400 when the request body is too large
RFC2616 says servers should return this status code when
rejecting requests that are too large.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.14
R=bradfitz
CC=golang-dev
https://golang.org/cl/4962041
Diffstat (limited to 'src/pkg/http/server.go')
| -rw-r--r-- | src/pkg/http/server.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/http/server.go b/src/pkg/http/server.go index a6cb5eeafa..654af378a1 100644 --- a/src/pkg/http/server.go +++ b/src/pkg/http/server.go @@ -572,7 +572,7 @@ func (c *conn) serve() { // responding to them and hanging up // while they're still writing their // request. Undefined behavior. - msg = "400 Request Too Large" + msg = "413 Request Entity Too Large" } else if neterr, ok := err.(net.Error); ok && neterr.Timeout() { break // Don't reply } |
