diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-04-09 23:54:34 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-04-09 23:54:34 +0000 |
| commit | bc4638d722c0e48cfd6bc4d8084b41445f987004 (patch) | |
| tree | 3fa74811a9275d242c8f4808571abd95fe801e74 /django/core | |
| parent | b0a60c186ee2a5564b5fa897b994e4ff2b7ad5b2 (diff) | |
Fixed #1569 -- HttpResponse now accepts iterators. Thanks, Maniac
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2639 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core')
| -rw-r--r-- | django/core/handlers/modpython.py | 3 | ||||
| -rw-r--r-- | django/core/handlers/wsgi.py | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py index eec35ff072..37499c6f06 100644 --- a/django/core/handlers/modpython.py +++ b/django/core/handlers/modpython.py @@ -162,7 +162,8 @@ 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 - mod_python_req.write(http_response.get_content_as_string(settings.DEFAULT_CHARSET)) + for chunk in http_response.iterator: + mod_python_req.write(chunk) def handler(req): # mod_python hooks into this function. diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py index 23204e63a6..7541a5fd9d 100644 --- a/django/core/handlers/wsgi.py +++ b/django/core/handlers/wsgi.py @@ -172,6 +172,5 @@ class WSGIHandler(BaseHandler): response_headers = response.headers.items() for c in response.cookies.values(): response_headers.append(('Set-Cookie', c.output(header=''))) - output = [response.get_content_as_string(settings.DEFAULT_CHARSET)] start_response(status, response_headers) - return output + return response.iterator |
