From b5ee82c94377d2ac77012064ad6d93e032387aeb Mon Sep 17 00:00:00 2001 From: helloray Date: Tue, 1 Jan 2019 09:39:45 +0800 Subject: [PATCH] fix multi-select files download error when filename contains '+' (#571) Former-commit-id: fda2e75979b6d48ab77e1486d0d65375cae8ee03 [formerly 0ea1d769d4a591c522e7a642f386e3db579ce913] [formerly 230ee6abca47dd4a212d1481a294fc30972f3545 [formerly 7394f6b9bbe554d03a4e31a6bb03db2991097750]] Former-commit-id: 3786998d5b87591db765e5388886e217a3c58dc8 [formerly c4954221ab23794024ced09d0f858c65d0d82c23] Former-commit-id: 42bfe718742895fa9e03bf5dd5c1e53c826c510b --- lib/http/download.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http/download.go b/lib/http/download.go index d2143646..48c0a494 100644 --- a/lib/http/download.go +++ b/lib/http/download.go @@ -30,7 +30,7 @@ func downloadHandler(c *fb.Context, w http.ResponseWriter, r *http.Request) (int if len(names) != 0 { for _, name := range names { // Unescape the name. - name, err := url.QueryUnescape(name) + name, err := url.QueryUnescape(strings.Replace(name, "+", "%2B", -1)) if err != nil { return http.StatusInternalServerError, err }