Pages

Monday, August 15, 2011

What is HTTP, Role of HTTP in Web and HTTP Status Codes

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.
HTTP
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
http-server-header-status-codes
The details of these HTTP status codes are:
  • 100-101 Intermediate Status
100 continue The server returns this code to indicate that it has received the first part of a request and is waiting for the rest.
101 switching protocol The requester has asked the server to switch protocols
  • 200-206 Successful Response
200 Successful The server successfully processed the request
201 created the server created a new resource
202 accepted request is accepted and under processing.
203 Non-authoritative information The server processed the request, but is returning information that may be from another source
204 No content Server not returning any content after processing request
205 reset content response requires that the requester reset the document view. after facing 204 status code.
206 Partial content The server successfully processed a partial GET request.
  • 300-307 Redirects
300 Multiple choices There are multiple choices for users.
301 Moved permanently In future user will be redirected to the given url
302 Moved temporarily Temporarily user will be directed to the given url
303 See other location For all requests other than a HEAD request, the server automatically forwards to the other location.
304 Not modified The requested page hasn’t been modified since the last request.
305 Use proxy The requester can only access the requested page using a proxy.
306 Switch Proxy No longer used.
307 Temporary redirect The request should be repeated with another URI, but future requests can still use the original URI.
  • 400-417 Request Errors
400 Bad request The request cannot be fulfilled. because it is inappropriate.
401 not authorized specifically for use when authentication is possible but has failed.
402 Payment Required No longer used
403 forbidden Access decline due to unauthorized.
404 Not found When no results found as per query or URL provided by user
405 method not allowed The method specified in the request is not in the correct form.
406 Not acceptable The requested page can’t respond with the content characteristics requested
407 proxy authentication required Need to authenticate with proxy
408 Request timeout Request is not processed in the appropriate time interval
409 conflict When request conflict occurs
410 Gone Indicates that the resource requested is no longer available and will not be available again
411 length required The server won’t accept the request without a valid Content-Length header field
412 Precondition failed request fails to fulfill the precondition that are required by web server
413 request entity too large Server is not able to process too long request
414 Requested URI is too long Server can’t process long query string.
415 unsupported media type The request is in a format not support by the requested page
416 Requested range not satisfiable The server returns this status code if the request is for a range not available for the page
417Expectation failed server failed to process what ever the request expect by the client

  • 500-505 Server Errors
500 internal server error Server fails to interpreters the HTTP request. 

501 Not implemented When request is partially completed or can’t be send to client

502 bad gateway Server gateway is nor responding

503 Service unavailable server  is temporary out of service

504 gateway timeout Didn’t receive timely response from upstream server.

505 HTTP version not supported The server doesn’t support the HTTP protocol version used in the request.
I hope the concept of HTTP is very clear to you.

No comments:

Post a Comment