fix(copy): copy from driver that return writer (close #4291)

This commit is contained in:
Andy Hsu
2023-05-26 21:54:57 +08:00
parent 6b97b4eb20
commit b2f5757f8d
7 changed files with 91 additions and 77 deletions

View File

@ -249,7 +249,7 @@ func (h *Handler) handleGetHeadPost(w http.ResponseWriter, r *http.Request) (sta
w.Header().Set("Cache-Control", "max-age=0, no-cache, no-store, must-revalidate")
http.Redirect(w, r, u, http.StatusFound)
} else {
link, _, err := fs.Link(ctx, reqPath, model.LinkArgs{IP: utils.ClientIP(r), HttpReq: r})
link, _, err := fs.Link(ctx, reqPath, model.LinkArgs{IP: utils.ClientIP(r), Header: r.Header, HttpReq: r})
if err != nil {
return http.StatusInternalServerError, err
}