aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/net/http/status.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/net/http/status.go')
-rw-r--r--libgo/go/net/http/status.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/libgo/go/net/http/status.go b/libgo/go/net/http/status.go
index 5af0b77..d253bd5 100644
--- a/libgo/go/net/http/status.go
+++ b/libgo/go/net/http/status.go
@@ -51,6 +51,13 @@ const (
StatusServiceUnavailable = 503
StatusGatewayTimeout = 504
StatusHTTPVersionNotSupported = 505
+
+ // New HTTP status codes from RFC 6585. Not exported yet in Go 1.1.
+ // See discussion at https://codereview.appspot.com/7678043/
+ statusPreconditionRequired = 428
+ statusTooManyRequests = 429
+ statusRequestHeaderFieldsTooLarge = 431
+ statusNetworkAuthenticationRequired = 511
)
var statusText = map[int]string{
@@ -99,6 +106,11 @@ var statusText = map[int]string{
StatusServiceUnavailable: "Service Unavailable",
StatusGatewayTimeout: "Gateway Timeout",
StatusHTTPVersionNotSupported: "HTTP Version Not Supported",
+
+ statusPreconditionRequired: "Precondition Required",
+ statusTooManyRequests: "Too Many Requests",
+ statusRequestHeaderFieldsTooLarge: "Request Header Fields Too Large",
+ statusNetworkAuthenticationRequired: "Network Authentication Required",
}
// StatusText returns a text for the HTTP status code. It returns the empty