HTTP Status Code Definitions

The first set of HTTP codes starts with the number 1xx, which is used to transmit and transmit information such as sending and receiving files and indicates the temporary response mode of the server, assuming that the POST method is used in web forms. Yes, receiving code 100 means that our server accepts and processes the information, of course, code 100 continues this process, which continues without the need for a server and even sending an HTTP version in the browser. /1.0 uses, this code is incomprehensible and not processable.

the means that the server has received the request and can send further information. And the browser sends the header Expect: 100 — checks the status of the server to continue sending information, if in response receives the code 100, send further information, otherwise the code 417 Expectation Failed will be received.

The means requesting the browser from the server to change the data transfer protocol, in an image that this protocol change is useful or evaluating, it will follow the browser request, as an alternative to HTTP 0.1 to HTTP version 1. / 1 can be useful, or the same can be said for real-time synchronous protocols, for example in applications that use Ajax.

If the browser request from the server may involve performing tasks that each require processing, the server will send code 102 to the browser to indicate that the requested, received, and processed operation is being performed on the browser. Waiting for the server to respond completely and preventing disconnection due to timeout.

The means that the request sent by the user interface (which can be a browser or other tool) has been successfully received, approved, processed, and answered, 200 series code usually means that the request is perfect and the operation is correct. Is a server.

The standard HTTP code on the web is indicated by the number 200. Receiving a response of 200 from the server means that the requested address (in the GET method) or the desired operation (in the POST method) is completely and successfully performed by the server. Is. In a seamless communication between the user agent and the server, 200 series codes must be received.

The means successfully requesting and creating a new source on the server (assuming a new file or page is created), sending the 201 code is only valid in the image that the server created the new source, otherwise ( If). Source not yet created) must send code 202.

The means that it is used at the request of the interface, but the operation is not fully processed, so by the end of the requested operation, may be complete or vice versa.

Defined from HTTP version 1/1, means that the server has successfully responded to the interface request, but the information sent (in response to the server) is from an invalid source (assuming it is a copy of the information). (This is not confirmed), setting this code on servers is usually unnecessary and 200 codes can be sent instead.

The means to receive and process the user interface request correctly, but the server response does not contain specific content and can be assumed to be only information related to the requested resource update, this response is usually received from the server, meaning that the address Be requested. There is no change from the last request to the moment and the relevant file or page is displayed as before.

Is very similar to the function of code 204, ie here too no content is sent by the server, but on the user side, the current information is reset, which usually leads to the creation of empty content, this code is especially for Clearing web form information can be used.

Is used for situations that assume features such as continuing to download (resume download), by sending this code by the server, part of the user interface request is answered in part, in this way. Programs that support GNU Wget, or transfer from the server, will be able to continue receiving information even after disconnection, which must also be supported by the server.

This Code is for cases where the server, in response to the user interface request, suggests several different sources (for example, a file with different formats) and leaves the selection of a URL to the user’s browser, the selection operation is usually or automatically Is done or the server selects one of the URLs by default and sends it with its response.

This Code is one of the most important and sensitive HTTP codes, especially in SEO. Receiving this code from the server means the permanent transfer of a web address to another address, from this code, especially when in the site link address, to Whatever the reason for the changes, it can be used to redirect crawlers or users to the main link.

The means that the requested source has been found, but the browser must be temporarily moved to another address (Moved Temporarily), this is different from code 301, here the transfer is temporary and the original address is still valid and available Redirect 301 means to move permanently, delete the current address and replace it with a new one.

This Code also works similarly to code 302, the difference here is the emphasis on the GET method, in code 303 the current address and the address to which the user is transferred must be requested through the GET method, which normally will be the case.

This Code refers to cases where the browser, along with its request, requests information about the latest changes to the file or source from the server, if the file in question has not changed since the last request to date (with any change in Files, the date of the last change in the file information section is saved), the server in response sends the code 304 Not Modified, this not only saves server resources but also increases the processing speed on the user side It also has a very effective role.

The means that the server must use a proxy to access the requested resource, the proxy is actually the intermediary server between the user interface and the main server, hence and for security reasons some browsers such as Firefox and Internet Explorer, from This feature is not supported.

This code is similar to code 305, and when it comes to requesting a proxy change, this code is not currently applicable.

Code 307 is for when the main link source is temporarily available at another address, this is different from 302 and 303 redirects, here the transfer requires user approval and is not done automatically, the methods used must also be It is common between the main link and the transfer link, the rest of the conditions are similar to codes 302 and 303, and the user interface must continue to consider the current link as the main link in future references.

The 4xx class of status code is intended for cases in which the client seems to have erred. Except when responding to a HEAD request, the server SHOULD include an entity containing an explanation of the error situation, and whether it is a temporary or permanent condition. These status codes are applicable to any request method. User agents SHOULD display any included entity to the user. If the client is sending data, a server implementation using TCP SHOULD be careful to ensure that the client acknowledges receipt of the packet(s) containing the response, before the server closes the input connection. If the client continues sending data to the server after the close, the server’s TCP stack will send a reset packet to the client, which may erase the client’s unacknowledged input buffers before they can be read and interpreted by the HTTP application.

This code occurs because the syntax of the user interface request from the server is not understood, in which case the concept of a user request for the server is not clear and the request is not processable, this error may be due to other reasons, including transmission defect Data (assuming due to interruption or slowdown of communication) also occur.

Means unauthorized access, in which case the requested resource is not completely restricted, but the user request requires approval of access permissions (usually username and password), so the server responds with a form of Send WWW-Authenticate and asks the user to prove their validity.

This code is not currently in use and has been established for future purposes, the purpose of which is to define user accounts that require payment, although in practice this has not happened so far and code 402 is not used much.

This code is for when the user requests a resource from the server that is restricted to all users, this is different from the 401 code, here even with a username and password you can not access, Usually webmasters disable direct access to folders and display of files as a list, so when we request the address of a folder from that server, we get a 403 error.

This code occurs when the user interface requests a resource (for example, a file or page) from a server that does not currently exist or has been deleted (or may have been renamed), although it is possible That resource will be re-created and made available in the future.

This code means that the method used by the user to request a resource from the server is not allowed, assuming the GET method is used when the requested resource needs to send resources via the POST method, or the use of PUT in writing A file, for read-only files, in this case, the server will usually send the allowed method in response.

This code may be due to unacceptable characters in the request, some servers may respond to this security source, for example, mod_security module in Apache servers from accepting some web addresses ( Which, in terms of security, the server detects as suspicious) and receives an unacceptable message.

The function of code 407 is similar to code 401, except that here the user (user interface) must first prove its validity through a proxy.

This code occurs when the server is waiting for the user interface request, but no response is received at the standard time, so the server sends the 408 code and the user interface can resubmit the request the next time.

Code 409 means that a user request interferes with other operations on the server on the comment source, for example, when the user is editing a file one at a time and both are saving it, this error may occur. Which must be fixed manually.

Code 410 means to permanently remove the requested resource from the server, unlike 404 error, code 410 tells the user interface or search engines that they should not request that resource, because it is permanently deleted, but used in some cases. This code is very limited and the 404 error setting is better and more principled.

Code 411 means that the server refuses to respond to the interface request because there is no content size or length (Content-Length) in the submitted request, in which case the user interface should usually have its request in HTTP headers.

Code 412 means that the user interface request contains items (assuming the method is used) through which the server source is not accessible and the result of the initial server check is false.

Code 413 occurs when the request string length is too long for the server to exceed, but if this is temporary, the Retry-After tab is usually sent in response. The user interface can resubmit its request the next time.

This error means that the requested web address (URI) is too long and the server is unable to process it.

Code 415 is due to sending a format with a request (assuming uploading a file or image) that is not acceptable to the server and the server supports another format.

This code is due to sending a request for part of a source (assuming a part of a file) from the server, while that part does not exist, for example, the user requests part of a file (assuming when continuing Download is used) which is longer than the maximum length of its parts.

Code 417 means that the HTTP headers sent by the user interface do not meet the expectations and requirements of the server or the header has not been sent.

Response status codes beginning with the digit “5” indicate cases in
which the server is aware that it has erred or is incapable of
performing the request. Except when responding to a HEAD request, the
server SHOULD include an entity containing an explanation of the
error situation, and whether it is a temporary or permanent
condition. User agents SHOULD display any included entity to the
user. These response codes are applicable to any request method.

The 500 series code means the server is internally defective, however, the server is generally healthy and is probably temporarily upgrading or making changes, and the problem will be fixed in the coming hours.

This means that the server is unable to process the middle user error.

Code 502 is due to the lack of response from upstream servers and the current server acts as an intermediary gateway, in which case there are usually gateways between the main server and the user interface that can complete the process. Sending and receiving replies are not, this condition will usually be resolved by repeated attempts by the user.

Receiving the 503 code means that the server is unavailable due to heavy traffic (overload) or updating, this is usually temporary and will be resolved after a few minutes or hours.

Code 504 also means that the server as a gateway is not allowed to receive responses from upstream servers in the maximum time allowed.

Code 505 means that the HTTP version of the protocol used by the user interface is not supported, usually, the server also sends the reason for not supporting that version along with its response tabs.

In addition to what is said to be RFC 2616 W3C, there are other codes related to Microsoft servers and other web protocols that we have omitted because they are not applicable.

Resources: https://datatracker.ietf.org/doc/html/rfc2616

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store