Add maxrequestbody directive (#1163)

This commit is contained in:
Ngo The Trung
2016-11-04 08:25:49 +08:00
committed by Tw
parent 63f749112b
commit 0cdaaba4b8
9 changed files with 438 additions and 2 deletions
+4
View File
@@ -174,6 +174,10 @@ func (p Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
return 0, nil
}
if _, ok := backendErr.(httpserver.MaxBytesExceeded); ok {
return http.StatusRequestEntityTooLarge, backendErr
}
// failover; remember this failure for some time if
// request failure counting is enabled
timeout := host.FailTimeout