
Untitled
By: a guest on
Jun 13th, 2012 | syntax:
None | size: 0.99 KB | hits: 9 | expires: Never
--- ../lib/python2.7/site-packages/piston/utils.py.orig 2011-01-06 01:37:40.000000000 +0100
+++ ../lib/python2.7/site-packages/piston/utils.py 2011-01-06 01:38:27.861779001 +0100
@@ -181,7 +181,7 @@
"""
type_formencoded = "application/x-www-form-urlencoded"
- ctype = self.request.META.get('CONTENT_TYPE', type_formencoded)
+ ctype = self.request.META.get('CONTENT_TYPE', type_formencoded).split(";")[0].strip()
if ctype == type_formencoded:
return None
--- ../lib/python2.7/site-packages/piston/resource.py.orig 2010-12-31 16:24:21.990451428 +0100
+++ ../lib/python2.7/site-packages/piston/resource.py 2010-12-31 16:24:28.004663312 +0100
@@ -30,6 +30,7 @@
raise AttributeError, "Handler not callable."
self.handler = handler()
+ self.csrf_exempt = getattr(self.handler, 'csrf_exempt', True)
if not authentication:
self.authentication = NoAuthentication()