Revision 981d3b0d snf-pithos-app/pithos/api/util.py

b/snf-pithos-app/pithos/api/util.py
1038 1038

  
1039 1039

  
1040 1040
def update_response_headers(request, response):
1041
    if (not response.has_header('Content-Length') and
1042
        not (response.has_header('Content-Type') and
1043
             response['Content-Type'].startswith('multipart/byteranges'))):
1044
        response['Content-Length'] = len(response.content)
1045

  
1046 1041
    # URL-encode unicode in headers.
1047 1042
    meta = response.items()
1048 1043
    for k, v in meta:

Also available in: Unified diff