HTTP Common error return codes

Source: Internet
Author: User
Tags ftp client ftp protocol



HTTP Return Status code

When a user attempts to access content on a running host through an HTTP or FTP protocol, the Web server returns a numeric code that represents the status of the request. This status code is recorded in the server log and may also be displayed in a Web browser or FTP client. This is the error message code that is displayed by the browser when we open the page when the error occurs. The status code can indicate whether a specific request has succeeded, and can reveal the exact cause of the request failure.

The meaning of the HTTP protocol status code is mainly divided into five categories, which are generally:
——————————————-
1XX reserved
2XX indicates that the request was successfully received by
3XX request further refinement of requests for completion of customer requests
4XX Customer Error
5XX Server Error

Continue
Indicates that the client should continue the request. Loopback is used to notify the client that this request has been received and is not rejected by the server.
The client should continue to send the remaining request data, or the request has been completed, or the loopback data is ignored. The server must send
The final loopback is after the request.

101 Switching protocols
The server changes the current connection application protocol according to the customer service request, through the upgrade header information. The server will immediately change the protocol based on the upgrade header
At the end of the 101 send-back with a blank line.

Successful
———————————————-
OK
Indicates that the client's request has been successfully received, resolved, accepted.

201 Created
The request is complete and a new return resource is created. The resource that is created may be a URI resource, usually a URI resource specified in the location header. Loopback should contain one entity data
It also contains resource attributes and location to select the appropriate method through the user or user agent. The Entity Data format specifies the Content-type head by the coal type. The first server
The specified resource must be created before the 201 status code is returned. If the behavior is not executed immediately, the server should return 202.

202 Accepted
The request has been accepted for processing. But the processing did not complete. The request might or may not have been followed because the processing might have been rejected during the actual execution.

203 non-authoritative Information
is not authoritative information.
204 No Content
The server has accepted the request and does not need to return the Entity data, and may need to return the update information. The loopback may contain new or updated information that is rendered by entity-headers.

205 Reset Content
The server has accepted the request and the user agent should reset the document view.

206 Partial Content
The server has accepted the part of the request GET request resource. The request must contain a range header information to indicate that the fetch scope may have to contain the If-range header information to form the request condition.

Redirection
—————————————————
Multiple Choices
The request resource conforms to any one of the rendering methods.

301 Moved Permanently
The requested resource has been assigned a new URI.

302 Found
A temporary file that requests resources through different URIs.
303 See other

303 See other. Usually the requested resource is in a different place, and the same 3,021, the location of the resource is indicated in the header. In my one is the use process, I want to create a user, when about this user key already exists, the server will return 303, and tell the user's acquisition location.

Example
Client Request:

post/http/1.1
Host:www.example.com

Server Response:

http/1.1 303 See other
Location:http://example.org/other


650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/8D/9F/wKioL1ikHgXQn9fDAABJsVKzfus181.png "title=" Sp170215_172309.png "alt=" Wkiol1ikhgxqn9fdaabjsvkzfus181.png "/>

So seeing other means looking elsewhere. It is important to note that if you return 303, but you do not add a location, you will only see one request 303. In the default processing of httpclient, the Exception:location not found is thrown.


304 Not Modified
If the client has completed a conditional request and the request is allowed, but the document does not change, the server should return a 304 status code. 304
The status code must not contain the information body, which usually ends with the first empty line after a header field.

305 Use Proxy
The requested resource must be accessed through the proxy (specified by the Location field). The location resource gives the URI of the proxy.

306 Unused

307 Temporary Redirect
Temporary redirection.
Client Error
———————————————–
Request
The server cannot understand the request information because of the incorrect syntax.

401 Unauthorized
If the request requires user authentication. The loopback should contain a Www-authenticate header field that indicates the permission to request the resource.

402 Payment Required
Keep the status code.

403 Forbidden
The server accepts the request, but is denied processing.

404 Not Found
The server has found any resources that match Request-uri.

405 Menthod not allowed
Request-line The requested method is not allowed through the specified URI.

406 Not acceptable
The client browser does not accept the MIME type of the requested page.
407 Proxy Authentication Required
Proxy authentication is required.
408 Reqeust Timeout
The customer service side did not submit any requests within the server waiting time for processing.

409 Conflict

410 Gone

411 Length Required
The server refused to accept the request without defining the Content-length field.

412 Precondition Failed
The precondition failed.
413 Request Entity Too Large
The server refuses to process the request because the request data exceeds the scope that the server can handle. The server may close the current connection to prevent the client from continuing the request.

414 Request-uri Too Long
Server denial of service current request because the length of the URI exceeds the resolution range of the server.

415 Unsupported Media Type
The server denies the service the current request because the request data format is not supported by the requested resource.

416 Request Range Not satisfialbe
The requested range is not satisfied.
417 Expectation Failed
Execution failed.
Server Error
————————————————-
Internal Server Error
Server encounters an exception that prevents execution of the current request

501 Not implemented
The server does not have a corresponding execution action to complete the current request.

502 Bad Gateway
An invalid response was received when the WEB server was used as a gateway or proxy server.
503 Service Unavailable
The server cannot process the current request because of a temporary file overload.

504 Gateway Timeout
Gateway access timed out.
505 Http Version not supported
HTTP version is not supported.



Data from the Internet

This article from "The History of the strongest SB" blog, reproduced please contact the author!

HTTP Common error return codes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.