From: Dan Peterson Date: Mon, 11 Apr 2016 14:15:00 +0000 (-0300) Subject: net/http: document Error does not end the request X-Git-Tag: go1.7beta1~775 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=00681eec6aec03b8b2822c9220fba27c18923c01;p=gostls13.git net/http: document Error does not end the request Fixes #15205 Change-Id: Ia650806756758ca8ed2272b1696e59b809b16c61 Reviewed-on: https://go-review.googlesource.com/21836 Reviewed-by: Brad Fitzpatrick --- diff --git a/src/net/http/server.go b/src/net/http/server.go index e37df99deb..7a6950aee4 100644 --- a/src/net/http/server.go +++ b/src/net/http/server.go @@ -1652,6 +1652,8 @@ func (f HandlerFunc) ServeHTTP(w ResponseWriter, r *Request) { // Helper handlers // Error replies to the request with the specified error message and HTTP code. +// It does not otherwise end the request; the caller should ensure no further +// writes are done to w. // The error message should be plain text. func Error(w ResponseWriter, error string, code int) { w.Header().Set("Content-Type", "text/plain; charset=utf-8")