by eranation · 14y ago · 0 comments
Furthermore, it's in direct violation of the HTTP spec:
> If the request passes through a cache and the Request-URI identifies one or more currently cached entities, those entries SHOULD be treated as stale. Responses to this method are not cacheable.
As per RFC2119 (http://www.ietf.org/rfc/rfc2119.txt):
3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
may exist valid reasons in particular circumstances to ignore a
particular item, but the full implications must be understood and
carefully weighed before choosing a different course.So caching DELETE is against the spec.
I, however, agree that this behaviour shouldn't happen.
Should read my post as:
"Are you asking why this is bad? it is bad because..." and provided an example...
P.S. I like the Insult to injury quote, it's exactly how I felt when trying to debug it, took me an hour to figure that out...
- submitted the link in the first place
- tried to provide an explanation why this is a bad idea (i.e. wrong)
and telling you that this behavior is, in fact, not according to the specs.
Communication failure? Maybe it would help to clarify your statement a bit?
Edit: Reading a third and forth time I'm becoming less certain that _I_ got your point and the others didn't (note to self: That shouldn't be the default assumption). Did you really ask why that is bad?
Edit 2: Looking at your username and the issue comments I kind of assume that you are the commenter over at code.google.com, calling this 'severe'. So I'm back to my original assumption that you know perfectly fine why this is bad.
Why is this bad? Well, for example if you have an Image...
Just put the word "well," between the question and the explanation. I doubt they put that in a textbook though :)
From http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
Section "9.1.2 Idempotent Methods". "However, it is possible that a sequence of several requests is non- idempotent, even if all of the methods executed in that sequence are idempotent."
As well section "9.7 DELETE". The last sentence: Responses to this method are not cacheable.
The same in human language: there is no guarantee that you are deleting the same object because its ID matches. E.g. MD5 collisions are rare but they sometimes happen.
Thanks for all the ones who corrected me!