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

Re: POST for an exisiting id?



2008/1/2, Dirk Haun:
>
> 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.

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.

-- 
Thomas Broyer