Revision 288c1d55 pithos/api/functions.py

b/pithos/api/functions.py
608 608
            raise ItemNotFound('Object does not exist')
609 609
    
610 610
    # A Content-Type or Content-Range header may indicate data updates.
611
    if content_type and content_type.startswith('multipart/byteranges'):
611
    if content_type is None:
612
        return HttpResponse(status=202)
613
    if content_type.startswith('multipart/byteranges'):
612 614
        # TODO: Support multiple update ranges.
613 615
        return HttpResponse(status=202)
614 616
    # Single range update. Range must be in Content-Range.
615 617
    # Based on: http://code.google.com/p/gears/wiki/ContentRangePostProposal
616 618
    # (with the addition that '*' is allowed for the range - will append).
617
    if content_type and content_type != 'application/octet-stream':
619
    if content_type != 'application/octet-stream':
618 620
        return HttpResponse(status=202)
619 621
    content_range = request.META.get('HTTP_CONTENT_RANGE')
620 622
    if not content_range:

Also available in: Unified diff