Revision b0bc0d35

b/api/util.py
84 84
                    request.type = 'xml'
85 85
                else:
86 86
                    request.type = 'json'       # Default response format
87
                    for accept in request.META.get('HTTP_ACCEPT', '').split(','):
87
                    for item in request.META.get('HTTP_ACCEPT', '').split(','):
88
                        accept, sep, rest = item.strip().partition(';')
88 89
                        if accept == 'application/json':
89 90
                            break
90 91
                        elif accept == 'application/xml':

Also available in: Unified diff