Revision 7e45ddef api/util.py

b/api/util.py
103 103
    """Returns data sent by the client as a python dict."""
104 104
    
105 105
    data = request.raw_post_data
106
    if request.META.get('CONTENT_TYPE') == 'application/json':
106
    if request.META.get('CONTENT_TYPE').startswith('application/json'):
107 107
        try:
108 108
            return json.loads(data)
109 109
        except ValueError:

Also available in: Unified diff