Merge branch 'develop' of github.com:micahflee/onionshare into develop

This commit is contained in:
Micah Lee 2021-02-21 10:32:29 -08:00
commit 06f8289746
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -200,10 +200,10 @@ class ShareModeWeb(SendBaseModeWeb):
r.headers.set("Content-Encoding", "gzip") r.headers.set("Content-Encoding", "gzip")
r.headers.set("Content-Length", self.filesize) r.headers.set("Content-Length", self.filesize)
filename_dict = { filename_dict = {
'filename': unidecode(basename), "filename": unidecode(basename),
'filename*': "UTF-8''%s" % url_quote(basename) "filename*": "UTF-8''%s" % url_quote(basename),
} }
r.headers.set("Content-Disposition", "inline", **filename_dict) r.headers.set("Content-Disposition", "attachment", **filename_dict)
r = self.web.add_security_headers(r) r = self.web.add_security_headers(r)
# guess content type # guess content type
(content_type, _) = mimetypes.guess_type(basename, strict=False) (content_type, _) = mimetypes.guess_type(basename, strict=False)