From: Radek Czajka Date: Fri, 15 Mar 2019 13:41:33 +0000 (+0100) Subject: Remove misleading Content-Length. X-Git-Tag: 0.2.7 X-Git-Url: https://git.mdrn.pl/django-ssify.git/commitdiff_plain?ds=sidebyside Remove misleading Content-Length. --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 290fd36..8e05415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.2.7 (2019-03-15) + +* Remove Content-Length response header added in Django 1.11. + ## 0.2.6 (2019-02-13) * Django 1.9-1.11 compatibility. diff --git a/ssify/middleware.py b/ssify/middleware.py index 419a074..8e0f453 100644 --- a/ssify/middleware.py +++ b/ssify/middleware.py @@ -118,6 +118,8 @@ class SsiMiddleware(object): request.ssi_vars_needed = {} def _process_rendered_response(self, request, response): + if 'Content-Length' in response: + del response['Content-Length'] # Prepend the SSI variables. if hasattr(request, 'ssi_vars_needed'): vars_needed = request.ssi_vars_needed diff --git a/ssify/version.py b/ssify/version.py index 2147ed9..9873fd0 100644 --- a/ssify/version.py +++ b/ssify/version.py @@ -1,3 +1,3 @@ from __future__ import unicode_literals -VERSION = '0.2.6' +VERSION = '0.2.7'