do not check size if MaxSize == 0

This commit is contained in:
Acconut 2015-02-05 18:25:38 +01:00
parent 74a9a408e6
commit 04d559dd47
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ func (handler *Handler) postFile(w http.ResponseWriter, r *http.Request) {
}
// Test whether the size is still allowed
if size > handler.config.MaxSize {
if handler.config.MaxSize > 0 && size > handler.config.MaxSize {
handler.sendError(w, ErrMaxSizeExceeded)
return
}