Guest User

Untitled

a guest
Jun 13th, 2012
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. --- ../lib/python2.7/site-packages/piston/utils.py.orig 2011-01-06 01:37:40.000000000 +0100
  2. +++ ../lib/python2.7/site-packages/piston/utils.py 2011-01-06 01:38:27.861779001 +0100
  3. @@ -181,7 +181,7 @@
  4. """
  5. type_formencoded = "application/x-www-form-urlencoded"
  6.  
  7. - ctype = self.request.META.get('CONTENT_TYPE', type_formencoded)
  8. + ctype = self.request.META.get('CONTENT_TYPE', type_formencoded).split(";")[0].strip()
  9.  
  10. if ctype == type_formencoded:
  11. return None
  12. --- ../lib/python2.7/site-packages/piston/resource.py.orig 2010-12-31 16:24:21.990451428 +0100
  13. +++ ../lib/python2.7/site-packages/piston/resource.py 2010-12-31 16:24:28.004663312 +0100
  14. @@ -30,6 +30,7 @@
  15. raise AttributeError, "Handler not callable."
  16.  
  17. self.handler = handler()
  18. + self.csrf_exempt = getattr(self.handler, 'csrf_exempt', True)
  19.  
  20. if not authentication:
  21. self.authentication = NoAuthentication()
Advertisement
Add Comment
Please, Sign In to add comment