fix: cancel QueryEscape Disposition (close #1074)

pull/1093/head
Xhofe 2022-05-10 18:16:32 +08:00
parent 44b8c6abf7
commit d5626d6e2f
1 changed files with 1 additions and 1 deletions

View File

@ -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 {