cookieChoices = {};

Sunday, 21 July 2013

HTTP Protocol

HTTP Protocol:
  • ·         The communication between web server and web browser on internet is done using HTTP Protocol.
  • ·         HTTP is W3C specification.
  • ·         HTTP Protocol is safest protocol on internet.
  • ·         HTTP is stateless protocol .This is because it does not know whether the request that has been  made is part of an ongoing correspondence or just a single message.
  • ·          HTTP Communicates only in string Format and is thus virus free and is platform independent.
  • ·          HTTP Protocol works on PULL technology. i.e , we can pull everything available on web server but  we cannot push content to server unless server allows for it.

HTTP Request Structure (Browser->Server)          HTTP Response Structure (Server->Browser)

  1. Request Line                                                              1.Status Line
  2. Request Header                                                         2.Response Header
  3. Message Body(Posted data)                                      3.Message Body(Page Content)


Request Line: Method Path protocol / version
Example :    Get Demo/default.htm http/1.1

Request Header: These are the name value pairs submitted by the browser to server. It contains the informatin about the browser and the OS on the client machine.

Message Body: is the stream of name value pairs submitted to server when the form is submitted using the POST .

CGI Environment Variables:

Its a collection of name value pairs including request headers and information about the server in a context of a given request. The names of these variables are based on CGI(Common Gateway Interface) specification. These are also reffered as SERVER VARIABLES.

<form name="form1" action="demo.asp" method="post">
           <input type=".......
           <input type="submit" name="s1" value="submit">
</form>

when the form is submitted by clicking on the submit button it submits the Name/Value pair of every input element in the form to the server.


No comments:

Post a Comment