Limit POST form fields and file size + Generic Request Size limiter (#2317)

* Use less memory when receiving a file via multipart
* Add generic http request maximum size limiter to secure against malicious clients
This commit is contained in:
Anis Elleuch
2016-07-28 21:02:22 +02:00
committed by Harshavardhana
parent 7850d17f48
commit dcc3463e48
6 changed files with 45 additions and 12 deletions
+3
View File
@@ -32,3 +32,6 @@ var errInvalidToken = errors.New("Invalid token")
// If x-amz-content-sha256 header value mismatches with what we calculate.
var errContentSHA256Mismatch = errors.New("sha256 mismatch")
// used when we deal with data larger than expected
var errSizeUnexpected = errors.New("data size larger than expected")