Permalink
Browse files

Fix an error in the checking of the content-type field

  • Loading branch information...
loganb authored and jonklo committed Jul 20, 2011
1 parent 071d1a5 commit 45ed5d96f24ada1b46330e2a36451a4a7ea88c27
Showing with 1 addition and 1 deletion.
  1. +1 −1 dynamicresponse/middleware/dynamicformat.py
@@ -61,7 +61,7 @@ def process_request(self, request):
# Does the request contain a JSON payload?
content_type = request.META.get('CONTENT_TYPE', '')
- if content_type != '' and content_type in ('application/json'):
+ if content_type != '' and 'application/json' in content_type:
# Ignore empty payloads (e.g. for deletes)
content_length = 0

0 comments on commit 45ed5d9

Please sign in to comment.