aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormattack108 <matt.lenc@gmail.com>2013-01-15 12:06:12 +0000
committermattack108 <matt.lenc@gmail.com>2013-01-15 12:06:12 +0000
commit461178373f0b9f3d552bc0b2a546a4cd35599923 (patch)
tree804f1ec67ff5eb4ca27b30efd0c1cd9749690240
parentd11ef5c17b766241762faa8a38587e298e296459 (diff)
downloaddjango-wkhtmltopdf-461178373f0b9f3d552bc0b2a546a4cd35599923.tar.gz
django-wkhtmltopdf-461178373f0b9f3d552bc0b2a546a4cd35599923.tar.bz2
django-wkhtmltopdf-461178373f0b9f3d552bc0b2a546a4cd35599923.zip
Send good headers, in correct format
-rw-r--r--wkhtmltopdf/views.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/wkhtmltopdf/views.py b/wkhtmltopdf/views.py
index e888d09..0fa0b02 100644
--- a/wkhtmltopdf/views.py
+++ b/wkhtmltopdf/views.py
@@ -30,9 +30,10 @@ class PDFResponse(HttpResponse):
def set_filename(self, filename, show_content_in_browser):
self.filename = filename
if filename:
- fileheader = 'attachment; filename={0}'
+ # mattl: file name surrounded by double qoutes, per RFC2231
+ fileheader = 'attachment; filename="{0}"'
if show_content_in_browser:
- fileheader = 'filename={0}'
+ fileheader = 'inline; filename="{0}"'
filename = content_disposition_filename(filename)
header_content = fileheader.format(filename)