Ticket #10627: http.py.diff

File http.py.diff, 504 bytes (added by FunkyBob, 16 years ago)

Fix for django/middleware/http.py

  • http.py

     
    1010    """
    1111    def process_response(self, request, response):
    1212        response['Date'] = http_date()
    13         if not response.has_header('Content-Length'):
     13        if not response.has_header('Content-Length') and response._is_string:
    1414            response['Content-Length'] = str(len(response.content))
    1515
    1616        if response.has_header('ETag'):
Back to Top