Skip to content

Commit

Permalink
change variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
WeidiDeng committed Dec 19, 2024
1 parent 1e1daf9 commit 703aad1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/caddyhttp/encode/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}

Expand Down

0 comments on commit 703aad1

Please sign in to comment.