writeRequestBodyTooLarge writes a human-readable 413 response indicating that the request body exceeded maxRequestBodyBytes.
(w http.ResponseWriter)
| 349 | // writeRequestBodyTooLarge writes a human-readable 413 response indicating that |
| 350 | // the request body exceeded maxRequestBodyBytes. |
| 351 | func writeRequestBodyTooLarge(w http.ResponseWriter) { |
| 352 | http.Error(w, fmt.Sprintf( |
| 353 | "Request body too large. The maximum allowed request body size is %dMiB.", |
| 354 | maxRequestBodyBytes>>20, |
| 355 | ), http.StatusRequestEntityTooLarge) |
| 356 | } |
| 357 | |
| 358 | // ServeHTTP exposes the internal http.Handler, which has all [Provider]s' routes registered. |
| 359 | // It also tracks inflight requests. |
no test coverage detected