summaryrefslogtreecommitdiff
path: root/django/core/handlers/modpython.py
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-08-15 22:47:41 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-08-15 22:47:41 +0000
commitd22e88898fdd4d60d481e17f726d5b134ddc1daf (patch)
treec7ba91d153b61dd7491fcd70606d2e65096174ca /django/core/handlers/modpython.py
parentc727729183bdf773df9b7ebe725fb7a57e7508a2 (diff)
Changed handlers (both mod_python and WSGI) to support setting multiple cookies per request
git-svn-id: http://code.djangoproject.com/svn/django/trunk@511 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/handlers/modpython.py')
-rw-r--r--django/core/handlers/modpython.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/handlers/modpython.py b/django/core/handlers/modpython.py
index fafbd10598..d7d7c768b1 100644
--- a/django/core/handlers/modpython.py
+++ b/django/core/handlers/modpython.py
@@ -164,11 +164,11 @@ class ModPythonHandler(BaseHandler):
def populate_apache_request(http_response, mod_python_req):
"Populates the mod_python request object with an HttpResponse"
mod_python_req.content_type = http_response['Content-Type'] or httpwrappers.DEFAULT_MIME_TYPE
- if http_response.cookies:
- mod_python_req.headers_out['Set-Cookie'] = http_response.cookies.output(header='')
for key, value in http_response.headers.items():
if key != 'Content-Type':
mod_python_req.headers_out[key] = value
+ 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('utf-8'))