Erik Hetzner wrote:
A counterexample.
Right, but see, your resource changed from the first PUT request.
Therefore the Precondition Failed status code is appropriate. Again, if
a resource doesn't change, neither can its status code. The two are
linked together.
If your resource hadn't changed in the first PUT request, then the ETag
wouldn't have changed, and therefore the second PUT wouldn't result in a
412.
I'm not arguing the semantics of the spec, nor the strict definition of
"idempotent." You may be right on these technicalities. I'm just
saying what seems logical (at least to me), and that is one shouldn't
return two different status codes for a resource in the same state.
Anyway, I'm glad you see the point about DELETE. Cheers to that.
Adam
p.s. My last message was jumbled. Sorry, I was tired. ;)
p.p.s John, thanks for the great insights. I truly appreciated your
messages.