diff --git a/src/net/http/server.go b/src/net/http/server.go index e37df99deb0..7a6950aee4b 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")