CouchDB
  1. CouchDB
  2. COUCHDB-973

Return 410 when GETing a previously deleted document (rather than 404)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Activity

        Benjamin Young created issue -
        Benjamin Young made changes -
        Field Original Value New Value
        Attachment 410.patch [ 12468196 ]
        Jan Lehnardt made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Unresolved [ 9 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Benjamin Young
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development