We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd6ff5d commit 6ae6840Copy full SHA for 6ae6840
src/net/http/request.go
@@ -1128,7 +1128,9 @@ func readRequest(b *bufio.Reader) (req *Request, err error) {
1128
// underlying reader when its Close method is called.
1129
//
1130
// MaxBytesReader prevents clients from accidentally or maliciously
1131
-// sending a large request and wasting server resources.
+// sending a large request and wasting server resources. If possible,
1132
+// it tells the ResponseWriter to close the connection after the limit
1133
+// has been reached.
1134
func MaxBytesReader(w ResponseWriter, r io.ReadCloser, n int64) io.ReadCloser {
1135
if n < 0 { // Treat negative limits as equivalent to 0.
1136
n = 0
0 commit comments