Skip to content

Commit 1adbb2b

Browse files
leonklingelebradfitz
authored andcommitted
net/http: add StatusTooEarly (425)
StatusTooEarly can be returned to indicate that a server is unwilling to accept early data as introduced in TLS 1.3. The status code was specified in RFC 8470, section 5.2. Major supported browsers are: - Firefox as of version 58 https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/425#Browser_compatibility - Chromium as of version 73.0.3628.1 https://chromium.googlesource.com/chromium/src/+/58097ec3823e0f340ab5abfcaec1306e1d954c5a Change-Id: I3f62f4193bae198994d08fde7e92e0ccd080e59a GitHub-Last-Rev: fa88504 GitHub-Pull-Request: #29073 Reviewed-on: https://go-review.googlesource.com/c/152118 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent b3294d9 commit 1adbb2b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/net/http/status.go

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const (
5555
StatusUnprocessableEntity = 422 // RFC 4918, 11.2
5656
StatusLocked = 423 // RFC 4918, 11.3
5757
StatusFailedDependency = 424 // RFC 4918, 11.4
58+
StatusTooEarly = 425 // RFC 8470, 5.2.
5859
StatusUpgradeRequired = 426 // RFC 7231, 6.5.15
5960
StatusPreconditionRequired = 428 // RFC 6585, 3
6061
StatusTooManyRequests = 429 // RFC 6585, 4
@@ -122,6 +123,7 @@ var statusText = map[int]string{
122123
StatusUnprocessableEntity: "Unprocessable Entity",
123124
StatusLocked: "Locked",
124125
StatusFailedDependency: "Failed Dependency",
126+
StatusTooEarly: "Too Early",
125127
StatusUpgradeRequired: "Upgrade Required",
126128
StatusPreconditionRequired: "Precondition Required",
127129
StatusTooManyRequests: "Too Many Requests",

0 commit comments

Comments
 (0)