Subject: POST for an exisiting id?

From: "Dirk Haun" <[email-masked]>
Date: Wed, 2 Jan 2008 21:09:33 +0100

Apologies if I'm missing anything obvious, but I'm just sitting here
brooding over an Atom Protocol Exerciser Report and wondering "what does
it want from me?"

The APE's Mini One / Mini Two test apparently POSTs a second entry for
an already existing one (with the same id). Since RFC5023 states that
POST is for creation and PUT is for modification, I'm wondering what to
do in that situation.

We're currently returning a "400 Bad Request" but that doesn't make the
APE happy.

What should we do instead? Overwrite the old entry? Some other error
code? Where in the RFC is that situation covered?

Thanks for any hints.

bye, Dirk

-- 
http://www.geeklog.net/

---

From: Tim Bray <[email-masked]>
Date: Thu, 10 Jan 2008 15:12:52 -0800

> POST is for creation and PUT is for modification, I'm wondering what  

Oh hell yes, that's a bug.  Foo.  Apparently enough server  
implementations ignore client-provided IDs that nobody noticed  
before.  I don't think that what the Ape's doing is strictly forbidden  
by the RFC, but it's clearly bad practice and a server would  
definitely be within its rights in throwing the dupe-ID POSTs on the  
floor.

Fixed, thanks. -Tim