#14723: @last_modified should ignore lack of etag method when USE_ETAGS is enabled ---------------------------+------------------------------------------------ Reporter: lamby | Owner: nobody Status: new | Milestone: Component: Uncategorized | Version: 1.2 Keywords: | Stage: Unreviewed Has_patch: 0 | ---------------------------+------------------------------------------------ Using @last_modified with settings.USE_ETAGS does not work as expected.
My goal is to avoid evaluating the view for a select handful of expensive pages based on the Last-Modified header, and globally fallback to saving bandwidth with USE_ETAGS. However, if you enable USE_ETAGS and the @last_modified decorator, the view is still evaluated despite the last_modified_func being a match with If-Modified-Since. This is because the client is providing an ETag header (added because USE_ETAGS is enabled) and django.views.decorators.http.condition uses that etag along with the fact that we did did not provide an etag_func argument as a reason for not returning 304. Patch attached that disables this particular part of the logic if settings.USE_ETAGS is enabled. -- Ticket URL: <http://code.djangoproject.com/ticket/14723> Django <http://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 post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.
