summaryrefslogtreecommitdiff
path: root/django/core/handlers/modpython.py
diff options
context:
space:
mode:
authorChristopher Long <indirecthit@gmail.com>2006-09-23 18:18:58 +0000
committerChristopher Long <indirecthit@gmail.com>2006-09-23 18:18:58 +0000
commit5ea24f0c141a90f1e9a61ca7a8397cc28566623f (patch)
treef6946d2ab0ab835408e7a30032bca807816d3572 /django/core/handlers/modpython.py
parent13d039ddabc79113bb319a668a8283097de4d165 (diff)
[per-object-permissions] Merged to trunk [3809]
git-svn-id: http://code.djangoproject.com/svn/django/branches/per-object-permissions@3810 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/handlers/modpython.py')
-rw-r--r--django/core/handlers/modpython.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py
index 07c98e3b59..db3c33147b 100644
--- a/django/core/handlers/modpython.py
+++ b/django/core/handlers/modpython.py
@@ -155,8 +155,11 @@ def populate_apache_request(http_response, mod_python_req):
for c in http_response.cookies.values():
mod_python_req.headers_out.add('Set-Cookie', c.output(header=''))
mod_python_req.status = http_response.status_code
- for chunk in http_response.iterator:
- mod_python_req.write(chunk)
+ try:
+ for chunk in http_response:
+ mod_python_req.write(chunk)
+ finally:
+ http_response.close()
def handler(req):
# mod_python hooks into this function.