1. imbolc
  2. pysi

Commits

imbolc  committed 3f12f37

fix bad cookie parsing

  • Participants
  • Parent commits 8496fa9
  • Branches default

Comments (0)

Files changed (2)

File pysi/wsgi.py

View file
  • Ignore whitespace
 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):

File setup.py

View file
  • Ignore whitespace
 import os
 from setuptools import setup
 
-VERSION = '0.17.0'
+VERSION = '0.17.1'
 PACKAGE = 'pysi'
 
 if __name__ == '__main__':