1
0
mirror of https://github.com/django/django.git synced 2025-10-27 07:36:08 +00:00

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
This commit is contained in:
Adrian Holovaty
2005-08-15 22:47:41 +00:00
parent c727729183
commit d22e88898f
2 changed files with 6 additions and 6 deletions

View File

@@ -138,9 +138,9 @@ class WSGIHandler(BaseHandler):
except KeyError:
status_text = 'UNKNOWN STATUS CODE'
status = '%s %s' % (response.status_code, status_text)
response_headers = response.headers
if response.cookies:
response_headers['Set-Cookie'] = response.cookies.output(header='')
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('utf-8')]
start_response(status, response_headers.items())
start_response(status, response_headers)
return output