aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp/replacer.go
diff options
context:
space:
mode:
authorKallyDev <[email protected]>2021-09-30 01:17:48 +0800
committerGitHub <[email protected]>2021-09-29 11:17:48 -0600
commitc48fadc4a7655008d13076c7f757c36368e2ca13 (patch)
tree3fe2837e02e9b664dd5b86afbe42494ac20997f8 /modules/caddyhttp/replacer.go
parent059fc32f002d00e980b438b3edbdf7b8bcdf9a90 (diff)
downloadcaddy-c48fadc4a7655008d13076c7f757c36368e2ca13.tar.gz
caddy-c48fadc4a7655008d13076c7f757c36368e2ca13.zip
Move from deprecated ioutil to os and io packages (#4364)
Diffstat (limited to 'modules/caddyhttp/replacer.go')
-rw-r--r--modules/caddyhttp/replacer.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/caddyhttp/replacer.go b/modules/caddyhttp/replacer.go
index d0767f097..4d27a840c 100644
--- a/modules/caddyhttp/replacer.go
+++ b/modules/caddyhttp/replacer.go
@@ -28,7 +28,6 @@ import (
"encoding/pem"
"fmt"
"io"
- "io/ioutil"
"net"
"net/http"
"net/textproto"
@@ -162,7 +161,7 @@ func addHTTPVarsToReplacer(repl *caddy.Replacer, req *http.Request, w http.Respo
return "", true
}
// replace real body with buffered data
- req.Body = ioutil.NopCloser(buf)
+ req.Body = io.NopCloser(buf)
return buf.String(), true
// original request, before any internal changes