Closed GoogleCodeExporter closed 9 years ago
201 should be returned on inital PUT and 204 when overriding existing resource.
Original comment by filip.na...@gmail.com
on 8 Aug 2008 at 10:57
The test is about inital put, not an override.
Test is made with junit and consists of:
1) PUT event
2) re-PUT event using if-tag (returns CONFLICT)
3) DELETE event
Original comment by robipo...@gmail.com
on 8 Aug 2008 at 12:42
Just for completeness, 9.6 PUT:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
"If a new resource is created, the origin server MUST inform the user agent via
the
201 (Created) response."
Obviously a client should be tolerant and process any 2xx response as valid. A
client
gains nothing in the 201 response status if it properly uses the If-None-Match:
*
header. (the If-None-Match already guarantees that the resource will be fresh)
Original comment by helge.h...@googlemail.com
on 11 Aug 2008 at 8:52
thx helge.
proper responses should be:
- PUT /new/resource.ics (without if-tag): CREATED
- re-PUT with if-none-match: PRECONDITION FAILED
imho client api should let the developer choiche the behavior of his apps, so
the
junits should not be too tolerant if server is not polite ;)
Peace, R.
Original comment by robipo...@gmail.com
on 14 Aug 2008 at 9:23
This is fixed. Now you get 201/204 properly. You also get "412 Precondition
Failed"
in case of etag conflict.
Original comment by di...@google.com
on 2 Oct 2008 at 11:58
Original issue reported on code.google.com by
robipo...@gmail.com
on 8 Aug 2008 at 9:58