#28104: conditional view processing decorator adds stale ETag
------------------------------------+------------------------------------
     Reporter:  Syed Safi Ali Shah  |                    Owner:  nobody
         Type:  Bug                 |                   Status:  new
    Component:  HTTP handling       |                  Version:  1.11
     Severity:  Normal              |               Resolution:
     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 Kevin Christopher Henry):

 Great, thanks for taking the initiative.

 Your documentation is putting the case too strongly:

 > You must provide ETag or Last-Modified headers in response to non-safe
 methods.

 It's always correct not to return those headers. The client can do a fresh
 `GET` to fetch the current representation and its conditional headers.
 Including the headers in the response, on the other hand, is a performance
 enhancement that is [https://tools.ietf.org/html/rfc7231#section-4.3.4
 sometimes incorrect]. ("An origin server MUST NOT send a validator header
 field (Section 7.2), such as an ETag or Last-Modified field, in a
 successful response to PUT unless the request's representation data was
 saved without any transformation applied to the body...")

--
Ticket URL: <https://code.djangoproject.com/ticket/28104#comment:5>
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/069.470e805eed5db9a59b0f2bb3b9c659a6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to