HTTP Status 501 - Not Implemented

Der HTTP-Status-Code 501 Not Implemented signalisiert, dass der Server die Request-Method oder benötigte Funktionalität nicht implementiert hat. Unterscheidet sich von 405 (Method Not Allowed) – Server unterstützt generell die Methode nicht, nicht nur für diese spezifische Resource.

Typ

Response-Status-Code

Syntax

Der Status Code wird zurückgegeben bei nicht-implementierter Funktionalität.

http
HTTP/1.1 501 Not Implemented

Direktiven

Der 501 Not Implemented Status Code wird für nicht-implementierte Features verwendet.

Method Not Implemented
Server erkennt Request-Method, hat sie aber nicht implementiert (z.B. PATCH, TRACE auf Legacy-Server). Unterscheidet sich von 405, wo Method für Resource nicht erlaubt ist.
Feature Not Supported
Kann auch für nicht-unterstützte Features verwendet werden (z.B. unimplementierte HTTP-Versionen, Extension-Headers).
Future Implementation
Signalisiert, dass Feature möglicherweise in Zukunft implementiert wird. Im Gegensatz zu 400 (permanent invalid Request).

Beispiele

Nachfolgend finden Sie praktische Anwendungsbeispiele für Status 501.

Beispiel 1 PATCH Method Not Implemented

http
PATCH /api/users/42 HTTP/1.1
Host: api.example.com
Content-Type: application/json-patch+json

[{"op": "replace", "path": "/email", "value": "new@example.com"}]

HTTP/1.1 501 Not Implemented
Content-Type: application/json

{
  "error": "method_not_implemented",
  "message": "PATCH method not implemented, use PUT for updates",
  "supported_methods": ["GET", "POST", "PUT", "DELETE"]
}

Beispiel 2 HTTP/3 Not Supported

http
GET / HTTP/3
Host: legacy.example.com

HTTP/1.1 501 Not Implemented
Content-Type: text/html

<html><body>
<h1>501 Not Implemented</h1>
<p>Server does not support HTTP/3</p>
</body></html>

Beispiel 3 WebDAV Method on Standard Server

http
PROPFIND / HTTP/1.1
Host: web.example.com

HTTP/1.1 501 Not Implemented
Content-Type: application/json

{
  "error": "webdav_not_supported",
  "message": "WebDAV methods not implemented on this server"
}

Not Implemented Flow

501 Not Implemented bei nicht-unterstützter HTTP Method

Vorteile für die Systemarchitektur

  • Clear Implementation Gaps: 501 signalisiert explizit, dass Feature nicht implementiert ist. Unterscheidet sich von Bugs (500) oder Permission-Issues (403).
  • API Evolution Communication: Kann verwendet werden um zu signalisieren, dass Feature noch nicht verfügbar ist aber geplant. Client kann alternative Methods verwenden oder Feature-Detection implementieren.
  • Standards Compliance: Server muss nicht alle HTTP-Methods implementieren. 501 ermöglicht Standards-compliant Rejection von optionalen Features.

Spezifikation

RFC 9110, Section 15.6.2 – HTTP Semantics https://www.rfc-editor.org/rfc/rfc9110.html#name-501-not-implemented

Weitere Spezifikationen

HTTP Status 405 - Method Not Allowed, OPTIONS Method