Ticket #10762: 10762.patch

File 10762.patch, 646 bytes (added by aaugustin, 4 years ago)
  • django/middleware/gzip.py

     
    1212    on the Accept-Encoding header.
    1313    """
    1414    def process_response(self, request, response):
    15         # It's not worth compressing non-OK or really short responses.
    16         if response.status_code != 200 or len(response.content) < 200:
     15        # It's not worth compressing really short responses.
     16        if len(response.content) < 200:
    1717            return response
    1818
    1919        patch_vary_headers(response, ('Accept-Encoding',))
Back to Top