Basic HTTP Protocol: How Webserver And Web client Talk Each Other
Basic HTTP Protocol: How Webserver And Web client (Browser )Talk Each Other
Webserver is A "server" which is specifically used for displaying web pages or web sites. Webserver store pages on it's directory and serve when requested by any web client (Browser) via HTTP Protocol. Every webserver has their unique IP address(Internet Protocol Address) which help the Browser to locate your webserver in Internet.
HTTP Protocol is used to distribute information on world wide web, which we call website, web page etc. The main aim of HTTP Protocol is to distribute information over Internet.
If we want to convert above example of information distribution in HTTP Protocol, the printed document will treat as 'Web page', your office is 'Web server' and your front desk is 'Port' to serve the HTTP Request.
Bellow is the steps you may take to distribute information on a printed document to your customer or general public:
- You Prepare a Document with your Information you want to distribute by printing it on a paper.
- Store it to Your Office.
- You told your Front Desk to handover the paper who ask for it.
- You inform your customer or public that you have informational document to give out from your office Front Desk
- Your Customer May Visit Your Office
- Your Customer Will Ask for the Document on Front Desk
- Your Front Desk Officer verify if he/she is asking for correct document.
- If correct, your front desk will give the document to the person who asked for it.
- If not correct, officer will inform the visitor that he is asking for a document which is not available on your Office.
- You can create a web page with the information you want to distribute
- You Store it to Your Web Server
- You Configure your web server to give only the right document (web page)
- You publish / inform your web server address (URL) to your target audience.
- Your audience will put your web server address on their browser (Web Client)
- Browser of your audience will connect to your web server via HTTP Protocol in Port 80, which is standard port of server use in HTTP Protocol. And ask for the document you offered before.
- Your Web Server will verify either your audience's browser is asking for right document (web page)
- If audience's browser is asking for right document, your web server will give it away
- If he is not asking for the document you want to distribute, your web server will inform the browser that the document is not available which he asked for.
GET /articles HTTP/1.1
Host:www.bauani.org
HTTP/1.1 200 OK
Date: Mon, 06 Oct 2008 21:38:55 GMT
Server: Apache/1.3.37 (Unix)
Last-Modified: Mon, 06 Oct 2008 19:36:09 GMT
ETag: "3c6002c-4c0a-48ea68a9"
Accept-Ranges: bytes
Content-Length: 19466
Content-Type: text/html
Document Content Serve by Server Start Here. I have remove the HTML Code as it is too long)GET /falsefile HTTP/1.1
Host:www.bauani.org
Server Responded:
HTTP/1.1 404 Not Found
Date: Mon, 06 Oct 2008 21:51:13 GMT
Server: Apache/1.3.37 (Unix) mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
Document Content Serve by Server Start Here. I have remove the HTML Code as it is too long)
Labels: HTTP Protocol

