Browse files

Set the request cookies property to an empty dict if cookie parsing f…


This commit reverses the bug introduced in commit 4a4d871, leaving an
undefined cookies property on failure to parse a request cookie.

The bug results in a 'NoneType is not iterable' error when calling
RequestHandler.get_cookie() after a cookie parsing exception.
  • Loading branch information...
1 parent bd03493 commit 756fadac7cd3bb669cc2552a1ef165f2719ba804 @jcbsv jcbsv committed Jan 5, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 tornado/
@@ -407,7 +407,7 @@ def cookies(self):
except Exception:
- self._cookies = None
+ self._cookies = {}
return self._cookies
def write(self, chunk, callback=None):

0 comments on commit 756fada

Please sign in to comment.