HTTP状态码及说明大全
在通过浏览器访问某个网站时,网站的响应头数据中,都会包含一个响应的状态码,如下图所示:
这种表示请求处理的状态码,一般包含两个部分:
HTTP 状态码(status code)和描述(reason-phrase)。
用于表示客户端HTTP请求的响应结果,标识服务器的处理是否处理正常状态,以及当前对应状态的简要描述。例如我们最常见的200表示响应成功,404代表找不到资源,500则是服务器异常等。
状态码的大类归纳信息总体如下:
1xx: 信息类状态(Informational)
请求到达,继续处理 (Request received, continuing process)
2xx: 成功(Success) -
请达正常处理完毕 (The action was successfully received, understood, and accepted)
3xx: 重定向(Redirection)
需要更多操作完成请求 (Further action must be taken in order to complete the request)
4xx: 客户端错误(Client Error)
请求包含语法错误或不能执行(The request contains bad syntax or cannot be fulfilled)
5xx: 服务器异常(Server Error)
服务器执行请求失败 (The server failed to fulfill an apparently valid request)
在Tomcat内部,也有一个文件用于罗列描述这些HTTP状态码,此文件位于
org.apache.catalina.valves.LocalStrings.properties,大概是下图的样子:
Tomcat内部在处理请求发送响应的时候,根据不同的情况获取对应的property,内部的实现方式一般是这个样子:
response.getWriter().write(sm.getString("http.403"))
华丽的分隔线下,则是全部HTTP状态码及简要描述,各位朋友请慢用!
长按下方二维码,关注我!
status code Description
100 Continue
101 Switching Protocols
102 Processing
103-199 Unassigned
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
207 Multi-Status
208 Already Reported
209-225 Unassigned
226 IM Used
227-299 Unassigned
300 Multiple Choices
301 Moved Permanently
302 Found
303 See Other
304 Not Modified
305 Use Proxy
306 (Unused)
307 Temporary Redirect
308 Permanent Redirect
309-399 Unassigned
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Timeout
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Payload Too Large
414 URI Too Long
415 Unsupported Media Type
416 Range Not Satisfiable
417 Expectation Failed
418-420 Unassigned
421 Misdirected Request
422 Unprocessable Entity
423 Locked
424 Failed Dependency
425 Unassigned
426 Upgrade Required
427 Unassigned
428 Precondition Required
429 Too Many Requests
430 Unassigned
431 Request Header Fields Too Large
432-450 Unassigned
451 Unavailable for Legal Reasons
452-499 Unassigned
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
505 HTTP Version Not Supported
506 Variant Also Negotiates
507 Insufficient Storage
508 Loop Detected
509 Unassigned
510 Not Extended
511 Network Authentication Required
512-599 Unassigned
各status code详细描述如下,源自tomcat内的配置文件:
http.100=The client may continue.
http.101=The server is switching protocols according to the "Upgrade" header.
http.102=The server has accepted the complete request, but has not yet completed it.
http.201=The request succeeded and a new resource has been created on the server.
http.202=This request was accepted for processing, but has not been completed.
http.203=The meta information presented by the client did not originate from the server.
http.204=The request succeeded but there is no information to return.
http.205=The client should reset the document view which caused this request to be sent.
http.206=The server has fulfilled a partial GET request for this resource.
http.207=Multiple status values have been returned.
http.208=This collection binding was already reported.
http.226=The response is a representation of the result of one or more instance-manipulations applied to the current instance.
http.300=The requested resource corresponds to any one of a set of representations, each with its own specific location.
http.301=The requested resource has moved permanently to a new location.
http.302=The requested resource has moved temporarily to a new location.
http.303=The response to this request can be found under a different URI.
http.304=The requested resource is available and has not been modified.
http.305=The requested resource must be accessed through the proxy given by the "Location" header.
http.307=The requested resource resides temporarily under a different URI.
http.308=The target resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs.
http.400=The request sent by the client was syntactically incorrect.
http.401=This request requires HTTP authentication.
http.402=Payment is required for access to this resource.
http.403=Access to the specified resource has been forbidden.
http.404=The requested resource is not available.
http.405=The specified HTTP method is not allowed for the requested resource.
http.406=The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers.
http.407=The client must first authenticate itself with the proxy.
http.408=The client did not produce a request within the time that the server was prepared to wait.
http.409=The request could not be completed due to a conflict with the current state of the resource.
http.410=The requested resource is no longer available, and no forwarding address is known.
http.411=This request cannot be handled without a defined content length.
http.412=A specified precondition has failed for this request.
http.413=The request entity is larger than the server is willing or able to process.
http.414=The server refused this request because the request URI was too long.
http.415=The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
http.416=The requested byte range cannot be satisfied.
http.417=The expectation given in the "Expect" request header could not be fulfilled.
http.422=The server understood the content type and syntax of the request but was unable to process the contained instructions.
http.423=The source or destination resource of a method is locked.
http.424=The method could not be performed on the resource because the requested action depended on another action and that action failed.
http.426=The request can only be completed after a protocol upgrade.
http.428=The request is required to be conditional.
http.429=The user has sent too many requests in a given amount of time.
http.431=The server refused this request because the request header fields are too large.
http.500=The server encountered an internal error that prevented it from fulfilling this request.
http.501=The server does not support the functionality needed to fulfill this request.
http.502=This server received an invalid response from a server it consulted when acting as a proxy or gateway.
http.503=The requested service is not currently available.
http.504=The server received a timeout from an upstream server while acting as a gateway or proxy.
http.505=The server does not support the requested HTTP protocol version.
http.506=The chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.
http.507=The resource does not have sufficient space to record the state of the resource after execution of this method.
http.508=The server terminated an operation because it encountered an infinite loop.
http.510=The policy for accessing the resource has not been met in the request.
http.511=The client needs to authenticate to gain network access.
status code来自:
http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
HTTP状态码及说明大全相关推荐
- HTTP 状态码详解大全 | HTTP Status Codes
以下是HTTP 状态码详解大全 | HTTP Status Codes" ,来自维基百科,可以按Ctrl+F快速查找需要的信息 1xx消息 这一类型的状态码,代表请求已被接受,需要继续处理. ...
- HTTP状态码详解大全
100 客户端应当继续发送请求.这个临时响应是用来通知客户端它的部分请求已经被服务器接收,且仍未被拒绝.客户端应当继续发送请求的剩余部分,或者如果请求已经完成,忽略这个响应.服务器必须在请求完成后向客 ...
- http状态码、含义大全
状态码 含义 100 客户端应当继续发送请求.这个临时响应是用来通知客户端它的部分请求已经被服务器接收,且仍未被拒绝.客户端应当继续发送请求的剩余部分,或者如果请求已经完成,忽略这个响应.服务器必须在 ...
- 常见HTTP状态码返回值大全
200 - 服务器成功返回网页 404 - 请求的网页不存在 503 - 服务不可用 http状态返回代码 1xx(临时响应) 表示临时响应并需要请求者继续执行操作的状态代码. http状态返回代码 ...
- 超全超详细的HTTP状态码大全
超全超详细的HTTP状态码大全 本部分余下的内容会详细地介绍 HTTP 1.1中的状态码.这些状态码被分为五大类: 100-199 用于指定客户端应相应的某些动作. 200-299 用于表示请求成功. ...
- http响应状态码大全
http响应状态码大全 转:http://blog.sina.com.cn/s/blog_4ae187490100x9u7.html http状态返回代码 1xx(临时响应) 表示临时响应并需要请求者 ...
- 网络常见状态码大全。收藏这一篇就够了(HTTP Status Code)
网络常见状态码大全 2开头(请求成功) 3开头(请求被重定向) 4开头(请求错误) 5开头(服务器错误) -------------------------------------------- 2开 ...
- http状态码大全304、201、203等等
常见HTTP状态码大全 我们经常会遇到404.500.302等提示,它们究竟是什么意思呢?除了这几个常见的状态码外,还有哪些我们没有遇到过的但有可能出现的状态码呢?网站的http状态对于网站维护人员来 ...
- 常见的HTTP状态码及HTTP状态码大全
常见的HTTP状态码: 2xx --成功,表示成功处理了请求 200 --服务器已成功处理请求并提供了请求的网页 204 --服务器成功处理了请求,但没有返回任何内容 3xx --重定向,每次请求中使 ...
最新文章
- android脚步---设置layout隐藏属性
- Thrown KeeperErrorCode = Unimplemented for /services exception
- javaweb实现文件上传,前端与后台的结合实现
- Linux C 算法与数据结构 --二叉树
- Ubuntu 扩展内存或断电之后卡在 /dev/sda1 clean 和 /dev/sda1 recovering journal
- 2-5:C++快速入门之引用,引用和指针的区别
- Number 和 Math 类
- 轻量化网络:MobileNets
- golang变量的注意
- 【LeetCode】【数组】题号:*453,数组元素相等的最小操作次数
- Java对象与JSON数据的相互转换
- Maven项目 整合 tomcat插件== tomcat7:run
- HTML table样式
- yarn安装JEST报错:EPERM: operation not permitted, unlink 解决方法
- spring cloud拓扑图
- oppoa11android版本是什么,oppoa11x处理器是什么?oppoA11x配置介绍
- 启动服务器后台打印系统,服务器打印后台处理
- x11-forwarding disabled解决办法
- 圣思园张龙-Java SE 第三讲(原生数据类型使用陷阱 Pitfall of Primitive Data Type)
- 使用idea连接阿里云RDS数据库