feat: encode path of url (close #1351)

This commit is contained in:
Noah Hsu
2022-08-12 14:51:23 +08:00
parent 0f853c86da
commit 06e15fc149
4 changed files with 4 additions and 4 deletions

View File

@ -230,7 +230,7 @@ func (h *Handler) handleGetHeadPost(w http.ResponseWriter, r *http.Request) (sta
} else if storage.Config().MustProxy() || storage.GetStorage().WebdavProxy() {
u := fmt.Sprintf("%s/p%s?sign=%s",
common.GetApiUrl(r),
utils.EncodePath(reqPath),
utils.EncodePath(reqPath, true),
sign.Sign(path.Base(reqPath)))
http.Redirect(w, r, u, 302)
} else {