Changes between Version 10 and Version 11 of StripWhitespaceMiddleware


Ignore:
Timestamp:
Oct 26, 2016, 10:26:38 AM (8 years ago)
Author:
matsaman
Comment:

ran into this issue using manage.py runserver with django-photologue images

Legend:

Unmodified
Added
Removed
Modified
  • StripWhitespaceMiddleware

    v10 v11  
    3232    def process_response(self, request, response):
    3333        if "text" in response['Content-Type']:
     34        # Uncomment the next line to avoid failure on cached / HTTP 304 NOT MODIFIED responses without Content-Type
     35        #if response.status_code == 200 and "text" in response['Content-Type']:
    3436            if hasattr(self, 'whitespace_lead'):
    3537                response.content = self.whitespace_lead.sub('', response.content)
    3638            if hasattr(self, 'whitespace_trail'):
    3739                response.content = self.whitespace_trail.sub('\n', response.content)
    38             # Uncomment the next line to remove empty lines
    3940            if hasattr(self, 'whitespace'):
    4041                response.content = self.whitespace.sub('', response.content)
Back to Top