java状态代码(Java status code).doc
java状态代码(Java status code)Nine point seven
When a Web server responds to a request from a browser or other client program, its response is generally composed of the following parts: a state line, several response heads, a blank line, and a content document. Here's one of the easiest responses:
The status line contains the HTTP version, the status code, and the short description information corresponding to the status code. In most cases, all response heads except Content-Type are optional. But Content-Type is required, and it describes the MIME type of the following document. Although most replies contain a document, some do not include, for example, the response to the HEAD request will never be attached to the document. There are many state codes that are actually used to identify a failed request that does not contain a document (or only a brief error message).
When a user attempts to access a content on a server running Internet information service (IIS) over HTTP, IIS returns a numeric code that represents the state of the request. The status code can indicate whether the request is successful or not, and also reveals the exact reason for the failure of the request.
1XX - information tips
These state codes represent temporary responses. The client should be ready to receive one or more 1XX responses before receiving the regular response.
The initial request of 100 - Continue has been accepted, and the client should continue to send the rest of the request. (HTTP 1.1 new)
101 - Switching Protocols server will be converted to another protocol according to client's request (HTTP 1.1 new)
2XX - success
This type of state code indicates that the server successfully accepts the client request.
200 - OK is normal, followed by replies to requests for GET and POST documents.
The 201 - Created server has created the document, and the Location header gives its URL.
202 - Accepted has accepted the request, but the processing has not yet been completed.
The 203 - Non-Autho
HTTP响应通常由状态行、响应头、空行和内容文档组成。状态行包含HTTP版本、状态码及对应描述。2XX表示成功,如200-OK。1XX为临时响应,3XX表示重定向,4XX和5XX表示客户端或服务器错误。例如,404表示请求资源未找到,500表示服务器内部错误。状态码帮助诊断请求失败原因。
1339

被折叠的 条评论
为什么被折叠?



