Commits

imbolc committed 3f12f37

fix bad cookie parsing

Comments (0)

Files changed (2)

 from hashlib import sha1
 from StringIO import StringIO
 from tempfile import TemporaryFile
-from Cookie import SimpleCookie
+from Cookie import SimpleCookie, CookieError
 
 import simplejson as json
 
 
     @cached_property
     def COOKIES(self):
-        return SimpleCookie(self.environ.get('HTTP_COOKIE', ''))
+        try:
+            return SimpleCookie(self.environ.get('HTTP_COOKIE', ''))
+        except CookieError:
+            return SimpleCookie('')
 
     @cached_property
     def scheme(self):
 import os
 from setuptools import setup
 
-VERSION = '0.17.0'
+VERSION = '0.17.1'
 PACKAGE = 'pysi'
 
 if __name__ == '__main__':