diff options
author | Matthew Holt <[email protected]> | 2024-04-19 10:29:56 -0600 |
---|---|---|
committer | Francis Lavoie <[email protected]> | 2024-04-23 19:55:18 -0400 |
commit | 259f7095039232d71f75d78add77a98ae15d5ff5 (patch) | |
tree | 9baaa4465fe60692128234564b419e0e61e4da32 | |
parent | cd975984d3be23634bc1842482a5a6a2863cc128 (diff) | |
download | caddy-259f7095039232d71f75d78add77a98ae15d5ff5.tar.gz caddy-259f7095039232d71f75d78add77a98ae15d5ff5.zip |
Ignore false positive lint error
-rw-r--r-- | modules/caddyhttp/requestbody/requestbody.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/caddyhttp/requestbody/requestbody.go b/modules/caddyhttp/requestbody/requestbody.go index 35e9bb001..d00455a8c 100644 --- a/modules/caddyhttp/requestbody/requestbody.go +++ b/modules/caddyhttp/requestbody/requestbody.go @@ -65,6 +65,7 @@ func (rb RequestBody) ServeHTTP(w http.ResponseWriter, r *http.Request, next cad r.Body = errorWrapper{http.MaxBytesReader(w, r.Body, rb.MaxSize)} } if rb.ReadTimeout > 0 || rb.WriteTimeout > 0 { + //nolint:bodyclose rc := http.NewResponseController(w) if rb.ReadTimeout > 0 { if err := rc.SetReadDeadline(time.Now().Add(rb.ReadTimeout)); err != nil { |