mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
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:
parent
816eae3508
commit
ad332e5ca9
3 changed files with 39 additions and 15 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue