In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of "what are the response status codes of HTTP". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "what are the response status codes of HTTP" can help you solve the problem.
HTTP is an application layer protocol, although the HTTP/2 version was launched in 2015 and is supported by major web browsers and web servers.
Its main features can be summarized as follows:
Support client / server mode.
Simple and fast: when a customer requests a service from the server, it only needs to send the request method and path. Because the HTTP protocol is simple, the program scale of the HTTP server is small, so the communication speed is very fast.
Flexibility: HTTP allows the transfer of any type of data object. The type being transmitted is marked by Content-Type.
Connectionless: connectionless means limiting the processing of only one request per connection. After the server processes the customer's request and receives the customer's reply, it disconnects. Transmission time can be saved in this way.
Stateless: the HTTP protocol is stateless. Statelessness means that the protocol has no memory ability for transactions. The lack of state means that if the previous information is required for subsequent processing, it must be retransmitted, which may result in an increase in the amount of data transmitted per connection. On the other hand, the server responds faster when it does not need previous information. To solve this problem, the Web program introduces the Cookie mechanism to maintain the state.
In addition, both the HTTP request message and the response message are composed of the start line (for request messages, the start line is the request line, and for response messages, the start line is the status line), the message header (optional), the blank line (only the lines of CRLF), and the message body (optional).
As a software tester, it is essential to understand the HTTP status returned by some servers. Only by figuring out these status codes will you be comfortable in your work. Let's take a comprehensive look at the HTTP status codes:
Response status code
The status code consists of three digits, the first of which defines the category of the response and has five possible values.
1xx: indication message-indicates that the request has been received and continues processing.
2xx: successful-indicates that the request has been successfully received, understood, and accepted.
3xx: redirect-- further operations must be taken to complete the request.
4xx: client error-the request has a syntax error or the request cannot be fulfilled.
5xx: server-side error-the server failed to fulfill a legitimate request.
Common status codes:
1xx-Information Tip
These status codes represent temporary responses. The client should be prepared to receive one or more 1xx responses before receiving a regular response.
100-Continue's initial request has been accepted and the customer should continue to send the rest of the request.
The 101s-Switching Protocols server will comply with the customer's request and switch to another protocol.
2xx-successful
This type of status code indicates that the server successfully accepted the client request.
200-OK is fine, and the response documents for GET and POST requests are followed.
The document has been created by the Created server, and its URL is given by the Location header.
202-Accepted has accepted the request, but the processing has not been completed.
The 203-Non-Authoritative Information document has been returned normally, but some response headers may be incorrect because a copy of the document is used and non-authoritative information is used.
There are no new documents in No Content, and browsers should continue to display the original documents. This status code is useful if the user refreshes the page regularly and Servlet can determine that the user document is new enough.
There is no new content in 205-Reset Content, but the browser should reset what it displays. Used to force the browser to clear the form input.
The Partial Content client sends a GET request (chunk request) with a Range header, and the server completes it.
3xx-redirect
The client browser must do more to implement the request. For example, a browser may have to request a different page on the server or repeat the request through a proxy server.
Documents requested by Multiple Choices customers can be found in multiple locations, which are already listed in the returned document. If the server wants to make a priority, it should be indicated in the Location response header.
The document requested by the Moved Permanently customer is elsewhere, the new URL is given in the Location header, and the browser should automatically access the new URL.
302-Found is similar to 301, but the new URL should be seen as a temporary replacement, not permanent. Notice that the corresponding status letter in HTTP1.0 is "Moved Temporatily". When this status code appears, the browser can automatically access the new URL, so it is a very useful status code. Note that this status code can sometimes be replaced with 301. Some servers return 301, others 302. Strictly speaking, we can only assume that the browser will redirect automatically only if the original request is GET. See 307.
303-See Other is similar to 301 See Other 302, except that if the original request is the redirect target document specified by the POST,Location header, it should be extracted through GET.
The Not Modified client has buffered documents and issues a conditional request (typically providing an If-Modified-Since header to indicate that the customer only wants to update the document on a specified date). The server tells the customer that the original buffered document can continue to be used.
Documents requested by Use Proxy customers should be extracted through the proxy server specified in the Location header (HTTP 1.1 new).
307-Temporary Redirect is the same as 302 (Found). Many browsers will mistakenly redirect in response to a 302 reply, even if the original request is POST, even if it can only be redirected when the response to the POST request is 303. For this reason, HTTP 1.1has added 307s to make it clear that there are several status codes: when a 303reply occurs, the browser can follow the redirected GET and POST requests; if it is a 307reply, the browser can only follow the redirection of the GET request.
4xx-client error
These status codes indicate that the request may have gone wrong, interfering with the server's processing of the request.
The Bad Request (error request) server does not understand the syntax of the request.
401-Unauthorized (unauthorized) request requires authentication. After logging in, the server may return this response to the page. A WWW-Authenticate header is included in the reply, and the browser displays the user name / password dialog box, and then issues the request again after filling in the appropriate Authorization header. IIS defines a number of different 401 errors that indicate a more specific cause of the error. These specific error codes are displayed in the browser, but not in the IIS log:
401.1-login failed.
401.2-the server configuration caused the login failure.
401.3-not authorized due to resource restrictions imposed by ACL.
401.4-filter authorization failed.
401.5-ISAPI/CGI application authorization failed.
401.7-access is denied by the URL authorization policy on the Web server. This error code is specific to IIS 6. 0.
403-the Forbidden (prohibited) server rejects the request. It is usually caused by permission settings for files or directories on the server. Forbidden access: IIS defines many different 403 errors that indicate a more specific cause of the error:
403.1-Executive access is prohibited.
403.2-read access is prohibited.
403.3-write access is prohibited.
403.4-SSL is required.
403.5-SSL 128 is required.
403.6-the IP address is rejected.
403.7-client certificate is required.
403.8-site access is denied.
403.9-too many users.
403.10-invalid configuration.
403.11-password change.
403.12-access to the mapping table is denied.
403.13-the client certificate is revoked.
403.14-reject directory list.
403.15-client access permission exceeded.
403.16-the client certificate is not trusted or invalid.
403.17-the client certificate has expired or is not yet valid.
403.18-the requested URL cannot be executed in the current application pool. This error code is specific to IIS 6. 0.
403.19-CGI cannot be executed for clients in this application pool. This error code is specific to IIS 6. 0.
403.20-Passport login failed. This error code is specific to IIS 6. 0.
404-the Not Found server could not find the requested web page. For example, if the request is for a web page that does not exist on the server, the server usually returns this code.
404.0-(none)-No files or directories were found.
404.1-the Web site cannot be accessed on the requested port.
404.2-the Web service extension locking policy blocks this request.
The 404.3-MIME mapping policy blocks this request.
405-Method Not Allowed request methods (GET, POST, HEAD, DELETE, PUT, TRACE, etc.) are not applicable to the specified resource, and the HTTP predicate used to access this page is not allowed (method is not allowed)
The resource specified by Not Acceptable has been found, but its MIME type is not compatible with that specified by the customer in the Accpet header, and the client browser does not accept the MIME type of the requested page.
407-Proxy Authentication Required (agent authorization required) this status code is similar to 401 (unauthorized), but specifies that the requestor should use an agent for authorization. If the server returns this response, the server also indicates the agent that the requestor should use.
408-Request Timeout No request has been made by the customer during the waiting time for the server license. The customer can repeat the same request later.
409-the Conflict (conflict) server collided while completing the request. The server must contain information about conflicts that occurred in the response. The server may return this code when responding to a PUT request that conflicts with the previous request, along with a list of differences between the two requests.
The document requested by 410-Gone is no longer available, and the server does not know which address to redirect to. It differs from 404 in that returning 407 indicates that the document has permanently left the specified location, while 404 indicates that the document is not available for unknown reasons.
411-Length Required (valid length required) the server will not accept requests that contain invalid content length header fields unless the customer sends a Content-Length header.
Some of the prerequisites specified in the Precondition Failed request header failed.
413-the size of the Request Entity Too Large target document exceeds what the server is currently willing to process. If the server thinks it can process the request later, it should provide a Retry-After header.
414-Request URI Too Long URI is too long.
415-unsupported media type.
416-the Requested Range Not Satisfiable server cannot satisfy the Range header specified by the customer in the request.
417-execution failed.
423-Lock error.
5xx-Server error
These status codes indicate that an internal error occurred while the server was trying to process the request. These errors may be the fault of the server itself, not the request error.
500-Internal Server Error (server internal error) the server encountered an error and could not complete the request.
500.12-the application is busy restarting on the Web server.
500.13-the Web server is too busy.
500.15-Direct request for Global.asa is not allowed.
500.16-the UNC authorization credentials are incorrect. This error code is specific to IIS 6. 0.
500.18-the URL authorization store cannot be opened. This error code is specific to IIS 6. 0.
500.100-Internal ASP error.
501-the Not Implemented (not yet implemented) server does not have the ability to complete the request. For example, the server might return this code when the server does not recognize the request method.
502-the Bad Gateway server, as a gateway or proxy, received an invalid response from the upstream server.
502.1-the CGI application timed out.
502.2-an error occurred in the CGI application.
503-Service Unavailable (service unavailable) the server is currently unavailable (due to overloading or downtime maintenance). Usually, this is just a temporary state.
504-the Gateway Timeout server, as a gateway or proxy, does not receive requests from the upstream server in a timely manner.
505-HTTP Version Not Supported (the HTTP version is not supported) the server does not support the HTTP protocol version used in the request.
This is the end of the content about "what are the response status codes of HTTP". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Interface modeenhanced list zonezonesetactive zoneset
© 2024 shulou.com SLNews company. All rights reserved.