Fix setting cookies under WSGI, broken by the rename from _new_cookies to _new_cookie in 70ea7a5a6c

This commit is contained in:
Casey Muller 2012-05-06 11:18:29 -07:00
parent 50244877b5
commit c3ed68a31d
1 changed files with 2 additions and 2 deletions

View File

@ -96,8 +96,8 @@ class WSGIApplication(web.Application):
status = str(handler._status_code) + " " + \
httplib.responses[handler._status_code]
headers = handler._headers.items()
for cookie_dict in getattr(handler, "_new_cookies", []):
for cookie in cookie_dict.values():
if hasattr(handler, "_new_cookie"):
for cookie in handler._new_cookie.values():
headers.append(("Set-Cookie", cookie.OutputString(None)))
start_response(status,
[(native_str(k), native_str(v)) for (k, v) in headers])