Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

This blog is part of 1 Tute Sets.

test
Tute set by rumika.joshi
1 Blogs
  • Http Status Codes and Explain all codes

    • 1/1
    • 1
    • 1
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 895
    Comment on it

    HTTP, Hypertext Transfer Protocol, is the medium through which clients and servers can communicate. Basically, it works as a request-response protocol between a client and server. When user clicks at any link, types in a URL or submits the form, then their browser sends a request to a server for information. When a server receives that request, it sends back an HTTP Response, with information to the client. This is a kind of invisible, but you've seen one of the common Response codes - 404, indicating a page was not found.There are some more response codes sent by servers. Below is a list of the current Response codes in HTTP 1.1, along with an explanation:

    Informational

    100 - Continue:
    Status code 100 shows that part of a request has been received without any issues, and in that condition, the rest of the request should be sent.

    101 - Switching Protocols:
    HTTP 1.1 is a type of protocol which is used to transfer data on web and it's status 101 indicates that the server is changing the protocol which is defined in the "Upgrade" header it returns to the client.

    200 - OK:
    The 200 status code is by far and the most common returned. It means, simply, that the request was accepted and understand, and finally is being processed.

    201 - Created:
    A 201 status code shows that a request was successfully accepted and as a result, a resource has been created (for example a new page).

    202 - Accepted:
    The status code 202 shows that a server has received and understand the given request, and that it has been accepted for processing, sometime it may or may not be processed immediately.

    203 - Non-Authoritative Information:
    A 203 status code means that the request has been received and understand, and that information finally sent back for the response is from a third party, rather than the original server. This is almost similar to a 200 level code.

    204 - No Content:
    The 204 status code means that the request has been received and understand, but there is no any need to send data back.

    205 - Reset Content:
    The 205 status code is a request from server to the client to reset the document from which, the original request has been sent. For example, if a user fills out a form, and submits it, a status code of 205 means the server is asking the browser to clear the form.

    206 - Partial Content:
    The 206 status code is a response to a request for part of a documents. This is used by advanced caching tools, when a user agent requests only a small part of a page, and just that section is returned. Redirection

    300 - Multiple Choices:
    The 300 status code specify that a resource has been moved and the response will also included to a list of locations from which the user agent can select the most appropriate.

    301 - Moved Permanently:
    The 301 status tells a client that the resources has been moved permanently to a new location. The response should also include this location. It tells the client to use the new URL the next time it wants to fetch the same resource.

    302 - Found:
    The 302 status tells a client that the resources has been moved temporarily to a new location. The responses should be included for this location. It tells the client that it should be carry on using the same URL to access this resource.

    303 - See Other:
    The 303 status code indicates that the response from the request can be found at the particular URL, and should be retrieved from there. It does not mean that something has been moved - it is simply identify the address at which the response to the request can be found.

    304 - Not Modified:
    The 304 status code is sent in response to a request that asked for the document only, if it was newer than the one client already had. generally, when a document is cached, the date it was cached is stored. The next time when the document is viewed, the client asks the server if the document has changed. If not, the client just reloads the document from the cache.

    305 - Use Proxy:
    The 305 Status code tells the client that the requested resources has been reached through a proxy, which will be specified in the response.

    307 - Temporary Redirect:
    The 307 Status code is sent when a document is temporarily available on a other URL, which is also returned. There is very little difference between a 302 status code and a 307 status code. 307 was created as another, less ambiguous, version of the 302 status code.

    400 - Bad Request:
    The 400 status code specify that the server did not understand the request due to bad syntax.

    401 - Unauthorized:
    The 401 status code specify that before a resources can be accessed, the client must be authorized by the server.

    402 - Payment Required:
    The 402 status code is not currently in use, being listed as "Reserved for future use".

    403 - Forbidden:
    A 403 status code specify that the client cannot access the requested resource. That might mean that the wrong username and password were sent in the request, or that the authorization on the server do not allow what was being asked.

    404 - Not Found:
    The 404 status code specify that the requested resource was not found in the URL given, and the server has no idea how long is this.

    405 - Method Not Allowed:
    The 405 status code specify that is returned when the client has tried to use a request method that the server does not allow. Requested methods that are allowed should be sent with the response (common request methods are POST and GET).

    406 - Not Acceptable:
    The 406 status code specify that, however the server understand and processed the request, the response is not able to understand by client. A client sends, as part of a request, headers indicating what types of data it can be use, and a 406 error is returned when the response is of a type is not that list.

    407 - Proxy Authentication Required:
    The 407 status code is totally similar to the 401 status code, and means that the client must be authorized by the proxy before the request can proceed.

    408 - Request Timeout:
    A 408 status code specify that the client did not produce a request quickly enough. A server is set to only wait for a certain amount of time for responses from clients, and a 408 status code indicates that time has been passed.

    409 - Conflict:
    A 409 status code specify that the server was not able to complete the request, frequently because a file would need to be edited, created or deleted, and that file cannot be edited, created or deleted.

    410 - Gone:
    A 410 status code is the 404's minor known cousin. It shows that a resource has permanently gone, and no new address is known further.

    411 - Length Required:
    The 411 status code occur when a server decline to process a request because a content length was not identify.

    412 - Precondition Failed:
    A 412 status code specify that one of the conditions the request was made under has been failed.

    413 - Request Entity Too Large:
    The 413 status code specify that the request was larger than the server is able to manage, either because of physical constraints or for settings. Generally, this happens when a file is sent using the POST method from a form, and the file is larger than the maximum size allowed in the server settings.

    414 - Request-URI Too Long:
    The 414 status code specify that the URL requested by the client was longer than it can handle.

    415 - Unsupported Media Type:
    A 415 status code is returned by a server to specify that part of the request was in an unsupported format.

    416 - Requested Range Not Satisfiable:
    A 416 status code specify that the server was not able to manage the request. This may be, for example, because the client demands for the 700th-800th bytes of a document, but the document was only 100 bytes long.

    417 - Expectation Failed:
    The 417 status code specify that the server was not able to perfectly finished the request. One of the headers sent to the server, the "Expect" header, specified an expectation the server could not meet.

    Server Error

    500 - Internal Server Error:
    A 500 status code specify that the server faced something it didn't expect and was not able to finished the request.

    501 - Not Implemented:
    The 501 status code specify that the server does not maintain all that is required for the request to be completed.

    502 - Bad Gateway:
    A 502 status code specify that when a server acting as a proxy, received a response from a server further upstream that it judged invalid.

    503 - Service Unavailable:
    A 503 status code is usually seen on busy servers, and it specify that the server was not able to complete the request because of server overload.

    504 - Gateway Timeout:
    A 504 status code is reoccurred when a server acting as a proxy has waited very long for a response from a server further upstream.

    505 - HTTP Version Not Supported:
    A 505 status code is reoccurred when the HTTP version specified in the request is not supported. The response should specify which HTTP versions are supported.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: