#27226: Remove patch_response_headers()'s setting of the "Last-Modified" header
-------------------------------------+-------------------------------------
     Reporter:  Rinat Khabibiev      |                    Owner:  Rinat
         Type:                       |  Khabibiev
  Cleanup/optimization               |                   Status:  closed
    Component:  HTTP handling        |                  Version:  1.10
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Josh Smeaton):

 For future visitors, this change breaks the default Akamai caching
 configuration which depends on a Last-Modified header. Akamai also allows
 opting in to ETag based caching strategies, but it is not the default. To
 fix Akamai caching, you'll need to add the Last-Modified header to the
 response:

 {{{
 from django.utils.http import http_date
 if not response.has_header('Last-Modified'):
     response['Last-Modified'] = http_date()

 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/27226#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.cabf96287c354aca1b4c55f7179eecf0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to