From 8567fb7a0a5c4d88a7bfb73ec1f0c4be4c58d1ff Mon Sep 17 00:00:00 2001 From: David Symonds Date: Tue, 22 Dec 2015 11:29:25 +1100 Subject: [PATCH] net/http: add new HTTP 451 status code, Unavailable For Legal Reasons. Approved by the IETF. https://datatracker.ietf.org/doc/draft-ietf-httpbis-legally-restricted-status/ Change-Id: I688597bb5f7ef7c7a9be660a4fcd2ef02d9dc9f4 Reviewed-on: https://go-review.googlesource.com/18112 Reviewed-by: Brad Fitzpatrick Run-TryBot: David Symonds --- src/net/http/status.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/net/http/status.go b/src/net/http/status.go index b071c5dc3e5..f3dacab6a92 100644 --- a/src/net/http/status.go +++ b/src/net/http/status.go @@ -47,6 +47,7 @@ const ( StatusPreconditionRequired = 428 StatusTooManyRequests = 429 StatusRequestHeaderFieldsTooLarge = 431 + StatusUnavailableForLegalReasons = 451 StatusInternalServerError = 500 StatusNotImplemented = 501 @@ -99,6 +100,7 @@ var statusText = map[int]string{ StatusPreconditionRequired: "Precondition Required", StatusTooManyRequests: "Too Many Requests", StatusRequestHeaderFieldsTooLarge: "Request Header Fields Too Large", + StatusUnavailableForLegalReasons: "Unavailable For Legal Reasons", StatusInternalServerError: "Internal Server Error", StatusNotImplemented: "Not Implemented",