[ 
https://issues.apache.org/jira/browse/COUCHDB-973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981187#action_12981187
 ] 

Robert Newson commented on COUCHDB-973:
---------------------------------------

I accept the argument that the ability to create a new resource at the same 
location at any time makes it difficult to call the deletion 'permanent' but 
consider the normal case of a web server. 410 is returned to indicate to the 
caller to clean up whatever lingering references they might have to the 
resource (its not coming back). That a new resource can appear at the same 
location, yielding a 200 response, just means that software makes a new link.

However, this is all hand-waving. What software, if any, would be enhanced by a 
410 response over a 404 response? What would be the advantage? Is it wrong in 
principle to expose the difference between deleted and non existent? By 
exposing the information, are we encouraging clients to change their behavior 
accordingly? And what would that behavior be?

In summary, I think 410 could be justified as a response code but it's not 
clear what value there is in exposing the difference and it's not clear if it's 
'right' to expose an internal detail this way.

> Return 410 when GETing a previously deleted document (rather than 404)
> ----------------------------------------------------------------------
>
>                 Key: COUCHDB-973
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-973
>             Project: CouchDB
>          Issue Type: Bug
>            Reporter: Benjamin Young
>            Priority: Trivial
>         Attachments: 410.patch
>
>
> When you GET a nonexistent doc you get (as you should) a 404 Not Found error. 
> However, if you GET a document that has previously existed you also get the 
> 404 response. It would be more informative (IMO) for the 410 Gone response 
> code to be used. 410 Gone's intention is for exactly this use case, and it 
> could have some value to CouchDB developers who need to know the document did 
> exist.
> CouchDB is already half way there as in the body of the 404 response it does 
> state that the document did exist (at least prior to compaction), so 
> outputing a 410 (again, prior to compaction) would hopefully be a trivial 
> patch. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to