Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-1963

404 seems better than 410 on REST DELETE method on non-existing content

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • High
    • Resolution: Fixed
    • None
    • 2.22.10, 2.24.01
    • None
    • None

    Description

      Currently, CXFJaxrsContentService#invoke() translates 404 into 410 on DELETE method.
      But, I think that 404 seems better in Context/Content-Aware JAX-RS Services, regardless of HTTP Verbs, where the content URLs can be dynamically decided based on sitemap configurations. 410 should be used only when the URL has been permanently removed.
      See the following excerpt [1] for detail:

      """
      However, after looking at how webmasters use them in practice we are now treating the 410 HTTP result code as a bit "more permanent" than a 404. So if you're absolutely sure that a page no longer exists and will never exist again, using a 410 would likely be a good thing. I don't think it's worth rewriting a server to change from 404 to 410, but if you're looking at that part of your code anyway, you might as well choose the "permanent" result code if you can be absolutely sure that the URL will not be used again. If you can't be sure of that (for whatever reason), then I would recommend sticking to the 404 HTTP result code.
      """

      [1] http://www.facebook.com/note.php?note_id=171741836732

      Attachments

        Activity

          People

            jsheriff Junaidh Kadhar Sheriff
            wko Woonsan Ko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: