From 703aad1de482632e7a011bc9be399641d0332c7b Mon Sep 17 00:00:00 2001 From: WeidiDeng Date: Thu, 19 Dec 2024 10:35:15 +0800 Subject: [PATCH] change variable name --- modules/caddyhttp/encode/encode.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/caddyhttp/encode/encode.go b/modules/caddyhttp/encode/encode.go index 148cb73fbc0..4a53db07941 100644 --- a/modules/caddyhttp/encode/encode.go +++ b/modules/caddyhttp/encode/encode.go @@ -365,7 +365,7 @@ func (rw *responseWriter) ReadFrom(r io.Reader) (int64, error) { rw.WriteHeader(http.StatusOK) } - rr, ok := rw.ResponseWriter.(io.ReaderFrom) + rf, ok := rw.ResponseWriter.(io.ReaderFrom) // sendfile can't be used anyway if !ok { return io.Copy(writerOnly{rw}, r) @@ -386,7 +386,7 @@ func (rw *responseWriter) ReadFrom(r io.Reader) (int64, error) { nr, err := io.Copy(rw.w, r) return nr + ns, err } - nr, err := rr.ReadFrom(r) + nr, err := rf.ReadFrom(r) return nr + ns, err }