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

Benjamin Young commented on COUCHDB-973:
----------------------------------------

>From rfc2616:
"A response received with a status code of 200, 203, 206, 300, 301 or
   410 MAY be stored by a cache and used in reply to a subsequent
   request, subject to the expiration mechanism, unless a cache-control
   directive prohibits caching."
   
Cache-Control is current set to must-revalidate, so...
"When the must-revalidate
      directive is present in a response received by a cache, that cache
      MUST NOT use the entry after it becomes stale to respond to a
      subsequent request without first revalidating it with the origin
      server. (I.e., the cache MUST do an end-to-end revalidation every
      time, if, based solely on the origin server's Expires or max-age
      value, the cached response is stale.)"
      
      
So, in the spirit of future and unexpected innovation, I'd like to see this 
included...but I'm happy to discuss it further.

Also, there are additional uses for 410 if it were available on /db URL's as 
well--but I'm not sure if CouchDB keeps that information around.

> 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