Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 13th, 2012  |  syntax: None  |  size: 0.99 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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()