Fixed #19006 - Quoted filenames in Content-Disposition header.

This commit is contained in:
Tim Graham 2012-10-03 14:43:36 -04:00
parent 1c03b23567
commit 234ca6c61d
3 changed files with 6 additions and 6 deletions

View file

@ -590,7 +590,7 @@ To tell the browser to treat the response as a file attachment, use the
this is how you might return a Microsoft Excel spreadsheet::
>>> response = HttpResponse(my_data, content_type='application/vnd.ms-excel')
>>> response['Content-Disposition'] = 'attachment; filename=foo.xls'
>>> response['Content-Disposition'] = 'attachment; filename="foo.xls"'
There's nothing Django-specific about the ``Content-Disposition`` header, but
it's easy to forget the syntax, so we've included it here.