From 3c10f29757f297b8ca760e517a2bf6e718783e90 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 13 Jun 2012 16:24:11 -0400 Subject: [PATCH] [release-branch.go1] net/http: clarify ErrBodyNotAllowed error message MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ««« backport fe8549b7050a 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 »»» --- src/pkg/net/http/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/net/http/server.go b/src/pkg/net/http/server.go index 924ffd3481..0572b4ae34 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") ) -- 2.50.0