http 状态码增加499
This commit is contained in:
parent
d2ee86b14f
commit
653843dc02
@ -21,8 +21,12 @@ type HttpCode struct {
|
||||
func newHttpCodeData(httpCode int) HttpCode {
|
||||
desc := http.StatusText(httpCode)
|
||||
if len(desc) == 0 {
|
||||
if httpCode == 499 {
|
||||
desc = "client request timeout"
|
||||
} else {
|
||||
desc = fmt.Sprintf("%v: unknown error", httpCode)
|
||||
}
|
||||
}
|
||||
return HttpCode{
|
||||
Value: httpCode,
|
||||
Code: httpCode,
|
||||
@ -90,6 +94,7 @@ var (
|
||||
newHttpCodeData(http.StatusTooManyRequests),
|
||||
newHttpCodeData(http.StatusRequestHeaderFieldsTooLarge),
|
||||
newHttpCodeData(http.StatusUnavailableForLegalReasons),
|
||||
newHttpCodeData(499),
|
||||
|
||||
// 5xx
|
||||
newHttpCodeData(http.StatusInternalServerError),
|
||||
|
Loading…
x
Reference in New Issue
Block a user