Commit 1afe0105 authored by Kenny Grant's avatar Kenny Grant Committed by Brad Fitzpatrick

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/33617Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 655a4e12
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment