Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP-Statuscode für gelöschte Objekte #394

Closed
akuckartz opened this issue Feb 4, 2018 · 4 comments
Closed

HTTP-Statuscode für gelöschte Objekte #394

akuckartz opened this issue Feb 4, 2018 · 4 comments
Labels

Comments

@akuckartz
Copy link
Contributor

Im Abschnitt "Gelöschte Objekte" steht:

Als HTTP-Statuscode muss weiterhin 200 verwendet werden.

Dies steht nach meiner Einschätzung in Widerspruch zu RFC 7231. Siehe #379 (comment)

@konstin konstin added the Invalid label Feb 4, 2018
@konstin
Copy link
Member

konstin commented Feb 4, 2018

Ein Statuscode wie 410 ist dann korrekt, wenn der Server unter der url keine Daten mehr ausliefern kann. Das würde aber der Spezifikation widersprechen, in der festgelegt ist, dass der Server auch bei gelöschten Objekten ein gültiges Objekt ausliefern muss.

Weiterhin handelt es sich bei gelöschten Objekten nicht um einen Fehler ("Client Error 4xx"), sondern um einen wichtigen Teil des Update-Mechanismus. 200 hat in der Praxis auch den Vorteil, dass man mit http-Bibliotheken einen Fehler leicht von einem gelöschten Objekt unterscheiden kann.

@konstin konstin closed this as completed Feb 4, 2018
@akuckartz
Copy link
Contributor Author

akuckartz commented Feb 4, 2018

Der HTTP-Status 410 impliziert (ebenso wie die anderen 4xx-Codes) nicht, das keine Daten ausgegeben werden können, sondern nur dies:

The 410 (Gone) status code indicates that access to the target
resource is no longer available at the origin server and that this
condition is likely to be permanent. ...
The 410 response is primarily intended to assist the task of web
maintenance by notifying the recipient that the resource is
intentionally unavailable and that the server owners desire that
remote links to that resource be removed.

@konstin
Copy link
Member

konstin commented Feb 4, 2018

Der HTTP-Status 410 impliziert (ebenso wie die anderen 4xx-Codes) nicht, das keine Daten ausgegeben werden können, [...]

Das ist bekannt.

Weiterhin heißt es in Kapitel 6.5.:

The 4xx (Client Error) class of status code indicates that the client seems to have erred.

Bei gelöschten liegt kein Fehler vor, weder auf Client- noch auf Serverseite.

Sowie in Kapitel 6.5.9.

It is not necessary to mark all permanently unavailable resources as "gone" or to keep the mark for any length of time -- that is left to the discretion of the server owner.

OParl verlangt, dass gelöschte Objekte markiert und unbeschränkt erhalten verbleiben.

@akuckartz
Copy link
Contributor Author

akuckartz commented Feb 4, 2018

Client seems to have erred

ist nicht gleichbedeutend damit, dass der Client einen "Fehler" gemacht hat (oder der Server). Deutsche Übersetzung laut Google: "scheint sich geirrt zu haben". Die stellenweise Verwendung des Begriffs "Error" in dem Kapitel 6.5 der HTTP-Spezifikation halte ich für nicht besonders glücklich.

So bedeutet ja 404 auch nur, dass das Objekt nicht oder nicht mehr existiert. Und 410 bedeutet, dass es einmal existiert hat und nun nicht mehr existiert.

OParl verlangt, dass gelöschte Objekte markiert und unbeschränkt erhalten verbleiben.

Für solche Fälle ist 410 gedacht. Das Zitat aus 6.5.9 besagt nur, dass HTTP keine - jedenfalls keine unbeschränkte - Markierung fordert. Wenn es keine Markierung gibt (oder keine mehr gibt) dann ist 404 die durch HTTP vorgesehene Antwort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants