Revision dcffd53e

b/snf-pithos-app/pithos/api/functions.py
493 493
        virtual = False
494 494
    
495 495
    # Naming policy.
496
    if prefix and delimiter:
496
    if prefix and delimiter and not prefix.endswith(delimiter):
497 497
        prefix = prefix + delimiter
498 498
    if not prefix:
499 499
        prefix = ''
......
536 536
        response.status_code = 200
537 537
        response.content = '\n'.join([x[0] for x in objects]) + '\n'
538 538
        return response
539
    
539

  
540 540
    try:
541 541
        objects = request.backend.list_object_meta(request.user_uniq, v_account,
542 542
                                    v_container, prefix, delimiter, marker,
......
818 818
    if request.META.get('HTTP_TRANSFER_ENCODING') != 'chunked':
819 819
        content_length = get_content_length(request)
820 820
    # Should be BadRequest, but API says otherwise.
821
    if not content_type:
821
    if content_type is None:
822 822
        raise LengthRequired('Missing Content-Type header')
823 823
    
824 824
    if 'hashmap' in request.GET:

Also available in: Unified diff