Revision 2938333b

b/docs/source/devguide.rst
816 816
* Some processing is done in the variable part of all ``X-*-Meta-*`` headers. If it includes underscores, they will be converted to dashes and the first letter of all intra-dash strings will be capitalized.
817 817
* A ``GET`` reply for a level will include all headers of the corresponding ``HEAD`` request.
818 818
* To avoid conflicts between objects and virtual directory markers in container listings, it is recommended that object names do not end with the delimiter used.
819
* The ``Accept`` header may be used in requests instead of the ``format`` parameter to specify the desired reply format. The parameter overrides the header.
819
* The ``Accept`` header may be used in requests instead of the ``format`` parameter to specify the desired reply format. The parameter overrides the header (**TBD**).
820 820
* Container/object lists use a ``200`` return code if the reply is of type json/xml. The reply will include an empty json/xml.
821 821
* In headers, dates are formatted according to RFC 1123. In extended information listings, dates are formatted according to ISO 8601.
822 822
* The ``Last-Modified`` header value always reflects the actual latest change timestamp, regardless of time control parameters and version requests. Time precondition checks with ``If-Modified-Since`` and ``If-Unmodified-Since`` headers are applied to this value.
b/pithos/api/util.py
684 684
    elif format == 'xml':
685 685
        return 'xml'
686 686
    
687
    for item in request.META.get('HTTP_ACCEPT', '').split(','):
688
        accept, sep, rest = item.strip().partition(';')
689
        if accept == 'application/json':
690
            return 'json'
691
        elif accept == 'application/xml' or accept == 'text/xml':
692
            return 'xml'
687
#     for item in request.META.get('HTTP_ACCEPT', '').split(','):
688
#         accept, sep, rest = item.strip().partition(';')
689
#         if accept == 'application/json':
690
#             return 'json'
691
#         elif accept == 'application/xml' or accept == 'text/xml':
692
#             return 'xml'
693 693
    
694 694
    return 'text'
695 695

  

Also available in: Unified diff