Ticket #5897: middleware.common.patch

File middleware.common.patch, 515 bytes (added by Scott Barr <scott@…>, 17 years ago)

Patch

  • common.py

     
    8888            else:
    8989                response['ETag'] = etag
    9090
     91        # Add the Content-Length header to the response if not already set
     92        if response.status_code == 200 and not response.has_header('Content-Length'):
     93            response['Content-Length'] = str(len(response.content))
     94
    9195        return response
    9296
    9397def _is_ignorable_404(uri):
Back to Top