From: Brad Fitzpatrick Date: Wed, 23 May 2012 16:31:24 +0000 (-0700) Subject: net/http: clarify ErrBodyNotAllowed error message X-Git-Tag: go1.1rc2~3136 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=eacc3cc8a1ad28e58dd8d87a10d165c826ed285f;p=gostls13.git net/http: clarify ErrBodyNotAllowed error message It's usually due to writing on HEAD requests. R=golang-dev, rsc, r, r CC=golang-dev https://golang.org/cl/6206106 --- diff --git a/src/pkg/net/http/server.go b/src/pkg/net/http/server.go index 727313d630..fb44b76361 100644 --- a/src/pkg/net/http/server.go +++ b/src/pkg/net/http/server.go @@ -31,7 +31,7 @@ import ( // Errors introduced by the HTTP server. var ( ErrWriteAfterFlush = errors.New("Conn.Write called after Flush") - ErrBodyNotAllowed = errors.New("http: response status code does not allow body") + ErrBodyNotAllowed = errors.New("http: request method or response status code does not allow body") ErrHijacked = errors.New("Conn has been hijacked") ErrContentLength = errors.New("Conn.Write wrote more than the declared Content-Length") )