From d5626d6e2feb15dc16d66687125e2b448d7dcb75 Mon Sep 17 00:00:00 2001 From: Xhofe Date: Tue, 10 May 2022 18:16:32 +0800 Subject: [PATCH] fix: cancel QueryEscape Disposition (close #1074) --- server/common/proxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/common/proxy.go b/server/common/proxy.go index 6a84d78f..e6a2174e 100644 --- a/server/common/proxy.go +++ b/server/common/proxy.go @@ -26,7 +26,7 @@ func Proxy(w http.ResponseWriter, r *http.Request, link *base.Link, file *model. _ = link.Data.Close() }() w.Header().Set("Content-Type", "application/octet-stream") - w.Header().Set("Content-Disposition", fmt.Sprintf(`attachment; filename=%s`, url.QueryEscape(file.Name))) + w.Header().Set("Content-Disposition", fmt.Sprintf(`attachment; filename=%s`, file.Name)) w.Header().Set("Content-Length", strconv.FormatInt(file.Size, 10)) if link.Header != nil { for h, val := range link.Header {