facebook/tornado — pull request #397 by swies (2011-11-06 17:15:51+00:00)
Title: Invalid Cookie header crashes get_cookie

A broken Cookie header, say "Cookie: /=exception;", causes self.request.cookies to be None. get_cookie() just tests this with 'in' right now, which causes a crash when self.request.cookies is None. The fix is just checking for the None case first in get_cookie().