[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: POST for an exisiting id?



Thomas Broyer wrote:

>2008/1/2, Dirk Haun:
>>
>> 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.
>
>I don't know what the APE waits for, but 400 is fine. 409 (Conflict)
>or 422 (Unprocessable entity; from RFC 2518) might feel better but 400
>is good enough.

I'm not fluent in Ruby, but looking at the source for the APE (def
test_sorting), I get the impression that this test is actually trying to
post 3 separate new entries and then do something with them. So it
expects the second post to succeed.

So this is either a bug in the APE (forgetting to provide different IDs
for the 3 entries) or a problem on our end (are we expected to auto-
assign new IDs when one already exists?).

I'm even more confused now. Help, please :-)

bye, Dirk


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