Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
net/http: backport "multipart ReadForm close file after copy" to 1.7 #17965
If we do another release of Go 1.7, back port:
Reportedly, it closes a potential DoS vector, exhausting a server's file descriptors.
…copy Always close the file regardless of whether the copy succeeds or fails. Pass along the close error if the copy succeeds Updates #16296 Fixes #17965 Change-Id: Ib394655b91d25750f029f17b3846d985f673fb50 Reviewed-on: https://go-review.googlesource.com/30410 Reviewed-by: Brad Fitzpatrick <email@example.com> Run-TryBot: Brad Fitzpatrick <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com> Reviewed-on: https://go-review.googlesource.com/33639 Reviewed-by: Chris Broadfoot <firstname.lastname@example.org> Reviewed-by: Ian Lance Taylor <email@example.com>