summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2009-05-07 15:40:13 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2009-05-07 15:40:13 +0000
commit67f9ad2801ce3d9da9e7739c07d81f759dbee162 (patch)
tree57504870be64bc6755fe1ee651f3af56a381fef7 /django
parent9b724aea20047f1ad3c8c644f3b79771860a09dd (diff)
[1.0.X] Fixed #9659: fixed `wsgi.file_wrapper` in the builtin server. Thanks, mitsuhiko. Backport of [10690] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10691 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/core/servers/basehttp.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/django/core/servers/basehttp.py b/django/core/servers/basehttp.py
index 287143b794..6fed0acc59 100644
--- a/django/core/servers/basehttp.py
+++ b/django/core/servers/basehttp.py
@@ -306,14 +306,15 @@ class ServerHandler(object):
env.setdefault('SERVER_SOFTWARE',self.server_software)
def finish_response(self):
- """Send any iterable data, then close self and the iterable
+ """
+ Send any iterable data, then close self and the iterable
- Subclasses intended for use in asynchronous servers will
- want to redefine this method, such that it sets up callbacks
- in the event loop to iterate over the data, and to call
- 'self.close()' once the response is finished.
+ Subclasses intended for use in asynchronous servers will want to
+ redefine this method, such that it sets up callbacks in the event loop
+ to iterate over the data, and to call 'self.close()' once the response
+ is finished.
"""
- if not self.result_is_file() and not self.sendfile():
+ if not self.result_is_file() or not self.sendfile():
for data in self.result:
self.write(data)
self.finish_content()