[tahoe-lafs-trac-stream] [tahoe-lafs] #1993: Abuse of HTTP status 410 Gone
tahoe-lafs
trac at tahoe-lafs.org
Thu May 30 01:00:03 UTC 2013
#1993: Abuse of HTTP status 410 Gone
-------------------------------+---------------------------
Reporter: kpreid | Owner:
Type: defect | Status: new
Priority: normal | Milestone: undecided
Component: code-frontend-web | Version: 1.10.0
Keywords: http | Launchpad Bug:
-------------------------------+---------------------------
!NotEnoughSharesError, !NoSharesError, and !UnrecoverableFileError, at
least, are being reported using HTTP status code 410 Gone, which is a
severe misuse of the code, as 410 means that the resource is '''known to
be''' forevermore unavailable. Per RFC 2616 section 10.4.11:
The requested resource is no longer available at the server and no
forwarding address is known. This condition is expected to be considered
permanent. Clients with link editing capabilities SHOULD delete references
to the Request-URI after user approval. If the server does not know, or
has no facility to determine, whether or not the condition is permanent,
the status code 404 (Not Found) SHOULD be used instead.
All of these errors indicate that the gateway is ''currently'' unable to
fulfill the request (as any of them could result from temporary partition
in the grid), not permanent deletion. 410 would be appropriate if, for
example, a mutable file were put into a revoked, “no content and cannot be
written to further”, state, but not for anything less drastic. (Tahoe is
unusual in having even the architectural possibility of having enough
confidence to correctly answer 410!)
The most appropriate response codes would be, I think, 404 for
!NoSharesError (because the grid has no knowledge of the file) and 503 for
!NotEnoughSharesError (because the grid knows the file exists but cannot
be served). !UnrecoverableFileError appears to be a conflation of the two
in the case of mutable files, and so I see no good answer there but to
introduce a distinction between the two cases.
Regardless, 410 should not be used in any of these cases.
I noticed this via https://tahoe-lafs.org/pipermail/tahoe-
dev/2013-May/008313.html .
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1993>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list