Revision 4d244f4a snf-pithos-app/pithos/api/util.py
b/snf-pithos-app/pithos/api/util.py | ||
---|---|---|
1037 | 1037 |
|
1038 | 1038 |
|
1039 | 1039 |
def update_response_headers(request, response): |
1040 |
if (not response.has_header('Content-Length') and |
|
1041 |
not (response.has_header('Content-Type') and |
|
1042 |
response['Content-Type'].startswith('multipart/byteranges'))): |
|
1043 |
response['Content-Length'] = len(response.content) |
|
1044 |
|
|
1045 | 1040 |
# URL-encode unicode in headers. |
1046 | 1041 |
meta = response.items() |
1047 | 1042 |
for k, v in meta: |
Also available in: Unified diff