#12789: ConditionalGetMiddleware behavior improvement.
-----------------------------------+----------------------------------------
Reporter: penzoil | Owner: nobody
Status: new | Milestone:
Component: Cache system | Version: SVN
Resolution: | Keywords: ETag,
ConditionalGetMiddleware, patch_response_headers
Stage: Unreviewed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-----------------------------------+----------------------------------------
Comment (by forest):
Hi,
I'm sorry, it looks like CommonMiddleware actually does set an ETag for
non-2XX responses, but it never returns HTTP 304 unless the response
generated by the view has a 2XX status code.
Now I'm unsure about what the proper fix should be. I think we should do
one or both of the following:
1. Don't set ETag on non-2XX responses (CommonMiddleware currently does
*not* do this, my patch implements it for patch_response_headers).
2. Don't replace non-2XX responses with HTTP 304 (CommonMiddleware
currently does this, ConditionalGetMiddleware currently does *not* do
this).
I suspect that CommonMiddleware should be fixed to not set an ETag on non-
2XX responses.
Thoughts?
Thanks,
Forest
--
Ticket URL: <http://code.djangoproject.com/ticket/12789#comment:5>
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.