HTTP Status Code

There are two main modes of transferring file over the World Wide Web, one is FTP (file transfer protocol) and other is HTTP (Hypertext Transfer Protocol) Which is the set of rules for transferring files (text, graphic images, sound, video, and other multimedia files) on the World Wide Web. As soon as a Web user opens their Web browser, the user is indirectly making use of HTTP. HTTP is an application protocol that runs on top of the TCP/IP suite of protocols. Whereas, FTP is used to transfer bulk files
 
How HTTP works:
We submitted URL (universal resource locator) in the URL bar and hits enter, Then our browser send HTTP requests to the web server for the web pages. Web server serves the HTTP request by convert that page in to appropriate form that our web browser can read and send the result via HTTP response. So HTTP is a medium to communicate to the web server. One more thing some server sends HTTP cookies on the web browser, in which all the personal setting and login data of user is stored.

There are various HTTP status codes to maintain the internet standards and helpful to sort out the problem. HTTP status codes are divides in to four major categories.
  • 100-101 Intermediate Status
  • 200-206 Successful Response
  • 300-307 Redirects
  • 400-417 Request Errors
  • 500-505 Server Errors


Status Code : 100
Associated Message : Continue
Meaning : Continue with partial request. (New in HTTP 1.1)

The server returns this code to indicate that it has received the first part of a request and is waiting for the rest.

Status Code : 101
Associated Message :  Switching Protocols
Meaning : Server will comply with Upgrade header and change to different protocol. (New in HTTP 1.1)

Status Code : 200
Associated Message :
Successful
Meaning : Everything's fine; document follows for GET and POST requests. This is the default for servlets; if you don't use setStatus, you'll get this.

Status Code : 201
Associated Message : Created
Meaning : Server created a document; the Location header indicates its URL

Status Code : 202
Associated Message : Accepted
Meaning : Request is being acted upon, but processing is not completed

Status Code : 203
Associated Message : Non-Authoritative Information
Meaning : Document is being returned normally, but some of the response headers might be incorrect since a document copy is being used. (New in HTTP 1.1)

Status Code : 204
Associated Message : No Content
Meaning : No new document; browser should continue to display previous document. This is a useful if the user periodically reloads a page and you can determine that the previous page is already up to date.

Status Code : 205
Associated Message : Reset Content
Meaning : No new document, but browser should reset document view. Used to force browser to clear CGI form fields. (New in HTTP 1.1)

Status Code : 206
Associated Message : Partial Content
Meaning : Client sent a partial request with a Range header, and server has fulfilled it. (New in HTTP 1.1)

Status Code : 300

Associated Message : Multiple Choices
Meaning : Document requested can be found several places; they'll be listed in the returned document. If server has a preferred choice, it should be listed in the Location response header.

Status Code : 301
Associated Message : Moved Permanently
Meaning : Requested document is elsewhere, and the URL for it is given in the Location response header. Browsers should automatically follow the link to the new URL

Status Code : 302
Associated Message :
Moved temporarily
Meaning : Similar to 301, except that the new URL should be interpreted as a temporary replacement, not a permanent one.

Status Code : 303
Associated Message : See Other
Meaning : Like 301/302, except that if the original request wasPOST, the redirected document (given in the Locationheader) should be retrieved via GET. (New in HTTP 1.1)

Status Code : 304
Associated Message : Not Modified
Meaning : Client has a cached document and performed a conditional request (usually by supplying an If-Modified-Since header indicating that it only wants documents newer than a specified date). Server wants to tell client that the old, cached document should still be used.

Status Code : 305
Associated Message : Use Proxy
Meaning : Requested document should be retrieved via proxy listed in Location header. (New in HTTP 1.1)

Status Code : 307
Associated Message : Temporary Redirect
Meaning :
The request should be repeated with another URI, but future requests can still use the original URI.This is identical to 302 ("Found" or "Temporarily Moved"). It was added to HTTP 1.1 since many browsers erroneously followed the redirection on a 302 response even if the original message was a POST , even though it really ought to have followed the redirection of a POST request only on a 303 response. This response is intended to be unambigously clear: follow redirected GET and POST requests in the case of 303 responses, only follow the redirection for GET requests in the case of 307 responses. Note: for some reason there is no constant in HttpServletResponse corresponding to this status code. (New in HTTP 1.1)

Status Code : 400
Associated Message : Bad Request
Meaning : Bad syntax in the request

Status Code : 401
Associated Message : Unauthorized
Meaning : Client tried to access password-protected page without proper authorization. Response should include a WWW-Authenticate header that the browser would use to pop up a username/password dialog box, which then comes back via the Authorization header.

Status Code : 403

Associated Message : Forbidden
Meaning : Resource is not available, regardless of authorization. Often the result of bad file or directory permissions on the server.

Status Code : 404
Associated Message : Not Found
Meaning : No resource could be found at that address. This is the standard "no such page" response. This is such a common and useful response that there is a special method for it in HttpServletResponse: sendError(message). The advantage of sendError over setStatus is that, with sendError, the server automatically generates an error page showing the error
message.

Status Code : 405

Associated Message : Method Not Allowed
Meaning : The request method (GET, POST, HEAD, DELETE , PUT, TRACE, etc.) was not allowed for this particular resource. (New in HTTP 1.1)

Status Code : 406
Associated Message : Not Acceptable
Meaning : Resource indicated generates a MIME type incompatible with that specified by the client via its Accept header. (New in HTTP 1.1)

Status Code : 407
Associated Message : Proxy Authentication Required
Meaning : Similar to 401, but proxy server must return a Proxy-Authenticate header. (New in HTTP 1.1)

Status Code : 408
Associated Message : Request Timeout
Meaning : The client took too long to send the request. (New in HTTP 1.1)

Status Code : 409
Associated Message : Conflict
Meaning : Usually associated with PUT requests; used for situations such as trying to upload an incorrect version of a file. (New in HTTP 1.1)

Status Code : 410
Associated Message : Gone
Meaning : Document is gone; no forwarding address known. Differs from 404 in that the document is is known to be permanently gone in this case, not just unavailable for unknown reasons as with 404. (New in HTTP 1.1)

Status Code : 411

Associated Message : Length Required
Meaning : Server cannot process request unless client sends a Content-Length header. (New in HTTP 1.1)

Status Code : 412

Associated Message : Precondition Failed
Meaning : Some precondition specified in the request headers was false. (New in HTTP 1.1)

Status Code : 413
Associated Message : Request Entity Too Large
Meaning : The requested document is bigger than the server wants to handle now. If the server thinks it can handle it later, it should include a Retry-After header. (New in HTTP 1.1)

Status Code : 414
Associated Message : Request URI Too Long
Meaning : The URI is too long. (New in HTTP 1.1)

Status Code : 415
Associated Message : Unsupported Media Type
Meaning : Request is in an unknown format. (New in HTTP 1.1)

Status Code : 416
Associated Message : Requested Range Not Satisfiable
Meaning : Client included an unsatisfiable Range header in request. (New in HTTP 1.1)

Status Code : 417

Associated Message : Expectation Failed
Meaning : Value in the Expect request header could not be met. (New in HTTP 1.1)

Status Code : 500
Associated Message : Internal Server Error
Meaning : Generic "server is confused" message. It is often the result of CGI programs or (heaven forbid!) servlets that crash or return improperly formatted headers.

Status Code : 501
Associated Message : Not Implemented
Meaning : Server doesn't support functionality to fulfill request. Used, for example, when client issues command like PUT that server doesn't support.

Status Code : 502
Associated Message : Bad Gateway
Meaning : Used by servers that act as proxies or gateways; indicates that initial server got a bad response from the remote server.

Status Code : 503
Associated Message : Service Unavailable
Meaning : Server cannot respond due to maintenance or overloading. For example, a servlet might return this header if some thread or database connection pool is currently full. Server can supply a Retry-After header.

Status Code : 504
Associated Message : Gateway Timeout
Meaning : Used by servers that act as proxies or gateways; indicates that initial server didn't get a response from the remote server in time. (New in HTTP 1.1)

Status Code : 505
Associated Message : HTTP Version Not Supported
Meaning : Server doesn't support version of HTTP indicated in request line. (New in HTTP 1.1)

1 comments:

Hello, everything is going sound here and ofcourse every
one is sharing facts, that's actually good, keep up writing.

Also visit my web site ... Code Psn Gratuit

 

Post a Comment

Pages