Update send_base_mode.py

This commit is contained in:
Kcchouette 2020-12-31 18:39:31 +01:00 committed by Saptak S
parent 589ea1cfae
commit c103108b28
No known key found for this signature in database
GPG Key ID: 2D9B32E54C68A3FB

View File

@ -24,6 +24,7 @@ import tempfile
import mimetypes
import gzip
from flask import Response, request, render_template, make_response
from unidecode import unidecode
class SendBaseModeWeb:
@ -262,7 +263,7 @@ class SendBaseModeWeb:
if use_gzip:
r.headers.set("Content-Encoding", "gzip")
r.headers.set("Content-Length", filesize)
r.headers.set("Content-Disposition", "inline", filename=basename)
r.headers.set("Content-Disposition", "inline", filename=unidecode(basename))
r = self.web.add_security_headers(r)
(content_type, _) = mimetypes.guess_type(basename, strict=False)
if content_type is not None: