]> Cypherpunks repositories - gostls13.git/commit
net/http: add response body to 413 and 400 errors
authorKenny Grant <kennygrant@gmail.com>
Sun, 27 Sep 2015 13:53:18 +0000 (14:53 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 5 Oct 2015 17:31:36 +0000 (17:31 +0000)
commit4a6326e7b5f326e6079073fb843b4ab096cbf652
treea944f3600989e25ca87ac543c1021ea1ed135b10
parent9dd81d62275a963e3d9c37453fcde42ab929bd96
net/http: add response body to 413 and 400 errors

The existing serve() method returns a zero-length response body when
it encounters an error, which results in a blank page and no visible
error in browsers.

This change sends a response body explaining the error for display in browsers.

Fixes #12745

Change-Id: I9dc3b95ad88cb92c18ced51f6b52bd3b2c1b974c
Reviewed-on: https://go-review.googlesource.com/15018
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/server.go