aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenny Grant <kennygrant@gmail.com>2016-11-29 20:40:40 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2016-11-30 00:34:42 +0000
commit1afe0105a6c415fe204fcb778e042210f1225b47 (patch)
tree07964844f28f1f002c40b65ae3a92aa257fc06e5
parent655a4e1284dadf3507a13b408d21900008e44221 (diff)
downloadgo-1afe0105a6c415fe204fcb778e042210f1225b47.tar.gz
go-1afe0105a6c415fe204fcb778e042210f1225b47.zip
net/http: remove logging on bad client requests
As discussed in #18095 the server should not log for bad user input. Change-Id: I628a796926eff3a971e5b04abec17ea377c3f9b7 Reviewed-on: https://go-review.googlesource.com/33617 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-rw-r--r--src/net/http/server.go2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/net/http/server.go b/src/net/http/server.go
index e8b5c139a1..6df9c260e4 100644
--- a/src/net/http/server.go
+++ b/src/net/http/server.go
@@ -1763,7 +1763,6 @@ func (c *conn) serve(ctx context.Context) {
// while they're still writing their
// request. Undefined behavior.
const publicErr = "431 Request Header Fields Too Large"
- c.server.logf("http: %s", publicErr)
fmt.Fprintf(c.rwc, "HTTP/1.1 "+publicErr+errorHeaders+publicErr)
c.closeWriteAndWait()
return
@@ -1777,7 +1776,6 @@ func (c *conn) serve(ctx context.Context) {
publicErr = publicErr + ": " + string(v)
}
- c.server.logf("http: %s", publicErr)
fmt.Fprintf(c.rwc, "HTTP/1.1 "+publicErr+errorHeaders+publicErr)
return
}