Refs #19705 -- Made GZipMiddleware make ETags weak.

Django's conditional request processing can now produce 304 Not Modified
responses for content that is subject to compression.
This commit is contained in:
Kevin Christopher Henry 2016-10-11 03:42:00 -04:00 committed by Tim Graham
parent 816eae3508
commit ad332e5ca9
3 changed files with 39 additions and 15 deletions

View file

@ -155,6 +155,9 @@ It will NOT compress content if any of the following are true:
* The request (the browser) hasn't sent an ``Accept-Encoding`` header
containing ``gzip``.
If the response has an ``ETag`` header, the ETag is made weak to comply with
:rfc:`7232#section-2.1`.
You can apply GZip compression to individual views using the
:func:`~django.views.decorators.gzip.gzip_page()` decorator.