mirror of
https://github.com/golang/go
synced 2024-11-23 12:40:11 -07:00
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 <bradfitz@golang.org> Run-TryBot: David Symonds <dsymonds@golang.org>
This commit is contained in:
parent
bbb88f9091
commit
8567fb7a0a
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user