On 08/03/2009, at 10:08 AM, Jan Lehnardt wrote:
On 8 Mar 2009, at 00:22, Antony Blakey wrote:
On 08/03/2009, at 4:41 AM, Chris Anderson wrote:
Currently it's recommended not to POST new documents without ids to
CouchDB. Due to HTTP protocol issues this can result in duplicate
document creation.
I've never really understood this. Wouldn't it mean that all POST
operations in CouchDB need to be made idempotent by the server
because they might be erroneously repeated by middleware?
Correct, a bug in Safari / CFNetwok brought this up.
I can't find a reference to a Safari/CFNetwork double post problem. Do
you have one? Will it become obsolete?
One implication of this is that a create or update might return a 412,
even though it has succeeded, because the client is seeing the
response from the second, repeated POST? And a bulk request might
return erroneous results as well?
On that basis, should only PUTs be allowed, to protect users from an
infrastructure bug they aren't aware of?
Those lmgtfy links seem to be about the double post being triggered by
the browser client, as opposed to e.g. a ruby client. I knew about
that problem, but I've not seen a problem report due to *middleware*
e.g. proxy/cache ignoring the non-idempotency of POST.
Antony Blakey
-------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787
Some defeats are instalments to victory.
-- Jacob Riis