Permalink
Browse files
applied patch to bug #121
- Loading branch information...
Showing
with
7 additions
and
1 deletion.
-
+7
−1
piston/utils.py
|
@@ -224,7 +224,13 @@ def content_type(self): |
|
|
"""
|
|
|
type_formencoded = "application/x-www-form-urlencoded"
|
|
|
|
|
|
- ctype = self.request.META.get('CONTENT_TYPE', type_formencoded)
|
|
|
+ # Applied patch from Bug #121 thread
|
|
|
+ # http://bitbucket.org/jespern/django-piston/issue/121/content-type-is-not-being-split-against
|
|
|
+
|
|
|
+ # Caused some issues with Firefox + jQuery appending UTF
|
|
|
+ # encoding onto the XHR request
|
|
|
+ ctype = self.request.META.get('CONTENT_TYPE',
|
|
|
+ type_formencoded).split(";")[0]
|
|
|
|
|
|
if type_formencoded in ctype:
|
|
|
return None
|
|
|
0 comments on commit
15e76be