diff --git a/src/serverHandler/archive.go b/src/serverHandler/archive.go index 8c8b83c..3894720 100644 --- a/src/serverHandler/archive.go +++ b/src/serverHandler/archive.go @@ -176,7 +176,7 @@ func writeArchiveHeader(w http.ResponseWriter, contentType, filename string) { header := w.Header() header.Set("Content-Type", contentType) - header.Set("Content-Disposition", "attachment; filename*=UTF-8''"+filename) + header.Set("Content-Disposition", "attachment; filename="+filename+"; filename*=UTF-8''"+filename) header.Set("Cache-Control", "public, max-age=0") w.WriteHeader(http.StatusOK) } diff --git a/src/serverHandler/content.go b/src/serverHandler/content.go index 545169a..5d9dcf5 100644 --- a/src/serverHandler/content.go +++ b/src/serverHandler/content.go @@ -10,7 +10,8 @@ func (h *aliasHandler) content(w http.ResponseWriter, r *http.Request, session * header.Set("Vary", session.vary) header.Set("X-Content-Type-Options", "nosniff") if data.IsDownload { - header.Set("Content-Disposition", "attachment; filename*=UTF-8''"+url.PathEscape(data.ItemName)) + filename := url.PathEscape(data.ItemName) + header.Set("Content-Disposition", "attachment; filename="+filename+"; filename*=UTF-8''"+filename) } item := data.Item