]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: document Error does not end the request
authorDan Peterson <dpiddy@gmail.com>
Mon, 11 Apr 2016 14:15:00 +0000 (11:15 -0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 11 Apr 2016 15:51:21 +0000 (15:51 +0000)
Fixes #15205

Change-Id: Ia650806756758ca8ed2272b1696e59b809b16c61
Reviewed-on: https://go-review.googlesource.com/21836
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/server.go

index e37df99deb0269fb4eeb23d55e1be966d363da92..7a6950aee4bdc1c7d63f94596880b90ce70e089a 100644 (file)
@@ -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")