1
0
mirror of https://github.com/django/django.git synced 2025-07-04 01:39:20 +00:00

[soc2009/http-wsgi-improvements] Fix HttpResponseSendFile indentation issue and set its initial content to be an empty string, for compatibility with ticket refs #6527.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/http-wsgi-improvements@11261 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Chris Cahoon 2009-07-17 11:47:54 +00:00
parent a873df6f37
commit 3e5ab0b8ec

View File

@ -447,8 +447,7 @@ class HttpResponseSendFile(HttpResponse):
content_type = guess_type(path_to_file)[0] content_type = guess_type(path_to_file)[0]
if content_type is None: if content_type is None:
content_type = "application/octet-stream" content_type = "application/octet-stream"
super(HttpResponseSendFile, self).__init__(None, super(HttpResponseSendFile, self).__init__('', content_type=content_type)
content_type=content_type)
self.sendfile_filename = path_to_file self.sendfile_filename = path_to_file
self.block_size = block_size self.block_size = block_size
self['Content-Length'] = os.path.getsize(path_to_file) self['Content-Length'] = os.path.getsize(path_to_file)