HTTP 状态码速查表

1xx 信息响应 状态码

100
继续 (Continue)
服务器已收到请求的初始部分,客户端应继续发送剩余部分
Standard response for successful HTTP requests.
101
切换协议 (Switching Protocols)
服务器根据客户端的请求切换协议
The server is switching protocols according to the client request.
102
处理中 (Processing)
服务器已收到并正在处理请求,但无响应可用
Server has received and is processing the request, but no response is available yet.
WebDAVRFC 2518已弃用
103
早期提示 (Early Hints)
用于与Link头一起返回,以允许客户端在服务器准备响应时预加载资源
Used with the Link header to allow the client to preload resources while the server prepares a response.
RFC 8297

2xx 成功响应 状态码

200
成功 (Success)
服务器已成功处理了请求。通常,这表示服务器提供了请求的网页
Standard response for successful HTTP requests.
201
已创建 (Created)
请求成功,并且服务器创建了新的资源
The request has been fulfilled, resulting in the creation of a new resource.
202
已接受 (Accepted)
服务器已接受请求,但尚未处理
The request has been accepted for processing, but the processing has not been completed.
203
非授权信息 (Non Authoritative Information)
服务器已成功处理了请求,但返回的信息可能来自另一来源
The server is a transforming proxy that received a 200 OK from its origin, but is returning a modified version of the origin's response.
204
无内容 (No Content)
服务器成功处理了请求,但没有返回任何内容
The server successfully processed the request and is not returning any content.
205
重置内容 (Reset Content)
服务器成功处理了请求,但没有返回任何内容。该响应要求请求者重置文档视图
The server successfully processed the request, but is not returning any content. This response requires that the requester reset the document view.
206
部分内容 (Partial Content)
服务器成功处理了部分GET请求
The server is delivering only part of the resource due to a range header sent by the client.
RFC 7233
207
多状态 (Multi-Status)
消息体中包含多个独立操作的响应状态
The message body that follows is an XML message and can contain a number of separate response codes.
WebDAVRFC 4918
208
已报告 (Already Reported)
在DAV中使用,用于避免在多状态响应中重复枚举成员
Used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly.
WebDAVRFC 5842
226
IM已使用 (IM Used)
服务器已经完成了对资源的GET请求,并且响应是对当前实例应用的一个或多个实例操作的结果
The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
RFC 3229

3xx 重定向 状态码

300
多种选择 (Multiple Choices)
针对请求,服务器可执行多种操作。服务器可根据请求者选择一项操作,或提供操作列表供请求者选择
Indicates multiple options for the resource from which the client may choose.
301
永久移动 (Moved Permanently)
请求的网页已永久移动到新位置。服务器返回此响应时,会自动将请求者转到新位置
This and all future requests should be directed to the given URI.
302
临时移动 (Found)
服务器目前从不同位置的网页响应请求,但请求者应继续使用原有位置来进行以后的请求
This is an example of industry practice contradicting the standard. The HTTP/1.0 specification required the client to perform a temporary redirect.
303
查看其他位置 (See Other)
请求者应当对不同的位置使用单独的GET请求来检索响应时,服务器返回此代码
The response to the request can be found under another URI using the GET method.
304
未修改 (Not Modified)
自从上次请求后,请求的网页未修改过。服务器返回此响应时,不会返回网页内容
Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.
305
使用代理 (Use Proxy)
请求者只能使用代理访问请求的网页。如果服务器返回此响应,还表示请求者应使用代理
The requested resource is available only through a proxy, the address for which is provided in the response.
306
切换代理 (Switch Proxy)
此状态码已不再使用,是为了兼容而保留
No longer used. Originally meant "Subsequent requests should use the specified proxy."
已弃用
307
临时重定向 (Temporary Redirect)
服务器目前从不同位置的网页响应请求,但请求者应继续使用原有位置来进行以后的请求
In this case, the request should be repeated with another URI; however, future requests should still use the original URI.
308
永久重定向 (Permanent Redirect)
请求和所有将来的请求应该使用另一个URI重复
The request and all future requests should be repeated using another URI.
RFC 7538

4xx 客户端错误 状态码

400
错误请求 (Bad Request)
服务器不理解请求的语法
The server cannot or will not process the request due to an apparent client error.
401
未授权 (Unauthorized)
请求要求身份验证。对于需要登录的网页,服务器可能返回此响应
Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.
RFC 7235
402
需要付款 (Payment Required)
该状态码是为了将来可能的需求而预留的。该状态码最初的意图可能被用作某种形式的数字现金或在线支付方案的一部分,但几乎没有哪家服务商使用,而且这个状态码通常不被使用。
Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme.
403
禁止 (Forbidden)
服务器拒绝请求
The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource.
404
未找到 (Not Found)
服务器找不到请求的网页
The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.
405
方法禁用 (Method Not Allowed)
禁用请求中指定的方法
A request method is not supported for the requested resource; for example, a GET request on a form that requires data to be presented via POST.
406
不接受 (Not Acceptable)
无法使用请求的内容特性响应请求的网页
The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
407
需要代理授权 (Proxy Authentication Required)
此状态码与401类似,但指定请求者应当授权使用代理
The client must first authenticate itself with the proxy.
RFC 2617
408
请求超时 (Request Timeout)
服务器等候请求时发生超时
The server timed out waiting for the request.
409
冲突 (Conflict)
服务器在完成请求时发生冲突。服务器必须在响应中包含有关冲突的信息
Indicates that the request could not be processed because of conflict in the request, such as an edit conflict.
410
已删除 (Gone)
如果请求的资源已永久删除,服务器就会返回此响应
Indicates that the resource requested is no longer available and will not be available again.
411
需要有效长度 (Length Required)
服务器不接受不含有效内容长度标头字段的请求
The request did not specify the length of its content, which is required by the requested resource.
412
未满足前提条件 (Precondition Failed)
服务器未满足请求者在请求中设置的其中一个前提条件
The server does not meet one of the preconditions that the requester put on the request.
RFC 7232
413
请求实体过大 (Payload Too Large)
服务器无法处理请求,因为请求实体过大,超出服务器的处理能力
The request is larger than the server is willing or able to process.
RFC 7231
414
请求的URI过长 (URI Too Long)
请求的URI过长,服务器无法处理
The URI provided was too long for the server to process.
RFC 7231
415
不支持的媒体类型 (Unsupported Media Type)
请求的格式不受请求页面的支持
The request entity has a media type which the server or resource does not support.
416
请求范围不符合要求 (Range Not Satisfiable)
如果页面无法提供请求的范围,则服务器会返回此状态码
The client has asked for a portion of the file, but the server cannot supply that portion.
RFC 7233
417
未满足期望值 (Expectation Failed)
服务器未满足"Expect"请求标头字段的要求
The server cannot meet the requirements of the Expect request-header field.
418
我是茶壶 (I'm a teapot)
服务器拒绝尝试用茶壶冲泡咖啡,本操作码是在1998年作为IETF的传统愚人节笑话, 在RFC 2324超文本咖啡壶控制协议中定义的,并不需要在真实的HTTP服务器中定义,同时也不是规范的HTTP状态码。这个HTTP状态码在某些网站与项目中用作彩蛋。
The server refuses the attempt to brew coffee with a teapot.
RFC 2324愚人节玩笑HTCPCP
421
请求被重定向 (Misdirected Request)
请求被定向到无法生成响应的服务器
The request was directed at a server that is not able to produce a response.
RFC 7540
422
无法处理的实体 (Unprocessable Entity)
请求格式正确,但由于语义错误而无法遵循
The request was well-formed but was unable to be followed due to semantic errors.
WebDAVRFC 4918
423
已锁定 (Locked)
正在访问的资源已锁定
The resource that is being accessed is locked.
WebDAVRFC 4918
424
依赖请求失败 (Failed Dependency)
由于先前的请求失败,所以此次请求失败
The request failed because it depended on another request and that request failed.
WebDAVRFC 4918
425
过早请求 (Too Early)
服务器不愿意冒险处理可能被重播的请求
Indicates that the server is unwilling to risk processing a request that might be replayed.
RFC 8470
426
需要升级 (Upgrade Required)
客户端应切换到不同的协议
The client should switch to a different protocol given in the Upgrade header field.
RFC 2817
428
要求先决条件 (Precondition Required)
原始服务器要求请求是有条件的
The origin server requires the request to be conditional.
RFC 6585
429
请求过多 (Too Many Requests)
用户在给定的时间内发送了太多请求
The user has sent too many requests in a given amount of time.
RFC 6585
431
请求头字段太大 (Request Header Fields Too Large)
服务器不愿意处理请求,因为其头字段太大
The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large.
RFC 6585
440
登录超时 (Login Time-out)
客户端session超时失效,需要重新登录。
The client session has expired and must log in again.
451
因法律原因不可用 (Unavailable For Legal Reasons)
服务器因法律原因拒绝请求
A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource.

5xx 服务器错误 状态码

500
服务器内部错误 (Internal Server Error)
服务器遇到错误,无法完成请求
A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
501
尚未实施 (Not Implemented)
服务器不具备完成请求的功能。例如,服务器无法识别请求方法时可能会返回此代码
The server either does not recognize the request method, or it lacks the ability to fulfil the request.
502
错误网关 (Bad Gateway)
服务器作为网关或代理,从上游服务器收到无效响应
The server was acting as a gateway or proxy and received an invalid response from the upstream server.
503
服务不可用 (Service Unavailable)
服务器目前无法使用(由于超载或停机维护)
The server is currently unavailable (because it is overloaded or down for maintenance).
504
网关超时 (Gateway Timeout)
服务器作为网关或代理,但是没有及时从上游服务器收到请求
The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
505
HTTP版本不受支持 (HTTP Version Not Supported)
服务器不支持请求中所用的HTTP协议版本
The server does not support the HTTP protocol version used in the request.
506
变量协商 (Variant Also Negotiates)
服务器存在内部配置错误
Transparent content negotiation for the request results in a circular reference.
RFC 2295
507
存储空间不足 (Insufficient Storage)
服务器无法存储完成请求所必须的内容
The server is unable to store the representation needed to complete the request.
WebDAVRFC 4918
508
检测到无限循环 (Loop Detected)
服务器检测到无限循环
The server detected an infinite loop while processing the request.
WebDAVRFC 5842
510
未扩展 (Not Extended)
获取资源所需要的策略并没有被满足
Further extensions to the request are required for the server to fulfil it.
RFC 2774
511
需要网络认证 (Network Authentication Required)
客户端需要进行身份验证才能获得网络访问权限
The client needs to authenticate to gain network access.
RFC 6585