]> Cypherpunks repositories - gostls13.git/commit
net/http: handle 413 responses more robustly
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 12 Nov 2012 23:20:18 +0000 (15:20 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 12 Nov 2012 23:20:18 +0000 (15:20 -0800)
commit73c67606e9659db662b195e241fdffb1d43a75e1
treef6965de070fd49d9ad52cd47b5510ac9e09c0413
parent16072c749750b7e4e6e1e48d4724afdfec574efa
net/http: handle 413 responses more robustly

When HTTP bodies were too large and we didn't want to finish
reading them for DoS reasons, we previously found it necessary
to send a FIN and then pause before closing the connection
(which might send a RST) if we wanted the client to have a
better chance at receiving our error response. That was Issue 3595.

This issue adds the same fix to request headers which
are too large, which might fix the Windows flakiness
we observed on TestRequestLimit at:
http://build.golang.org/log/146a2a7d9b24441dc14602a1293918191d4e75f1

R=golang-dev, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/6826084
src/pkg/net/http/server.go