HTTP Standards development of HTTP was coordinated by Internet

HTTP stands for Hyper
Text Transfer protocol. Development of HTTP was initiated by Tim Berners-Lee.
It is application layer protocol which provide the communication between HTTP
client and HTTP server. HTTP protocol mainly used to access data on World Wide Web
(WWW).HTTP protocol use the services of TCP on port 80. HTTP is a protocol to
exchange or transfer of Hypertext. HTTP function is a combination of FTP (File
Transfer Protocol) and SMTP (Simple Mail Transfer Protocol). Basically, HTTP is
TCP/IP based communication protocol that is used to exchange the data on World
Wide Web. This is foundation of data communication for World Wide Web.
Standards development of HTTP was coordinated by Internet Engineering Task
Force (IETF). First version of HTTP was developed in 1991 which is HTTP/0.9.
Main function of HTTP is to transmit data across the internet.

Version:

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

 

Year

HTTP Version

1991

0.9

1996

1.0

1997

1.1

2015

2.0

 

Working of HTTP:

An “HTTP client”
is a program that establish a connection and send a request to “HTTP server”.

Communication between
HTTP client and HTTP Server

An “HTTP server”
is also one type of program that accept a request and send response to “HTTP
Client”.

Features of HTTP:

There are some basic feature are describe here.

Connectionless: The HTTP client initiates an HTTP
request, after a request is made it gets disconnected from the server and waits
for a response. The server gives the response to the request received and re-establishes
the connection with the client to send a response back.

Independent: Any type of data can be sent by HTTP
but both the client and the server should know how to handle the data content.
It is required by both to specify the content type using appropriate MIME-type.

Stateless: As HTTP is connectionless it can
directly considered as a stateless protocol. The server and client are aware of
each other only while they are doing transaction with each other. After that,
both of them has no knowledge about each other. Due to this, both client and
the server cannot gain information of each other during different requests
across the web pages.

 

HTTP Architecture:

 

 

 

Architecture of HTTP
protocol.

 

The
HTTP protocol is based on a request/response model. The communication generally
takes place over a TCP/IP connection on the Internet. The default port is 80,
but other ports can be used. A requesting program (a client) establishes a
connection with a receiving program (a server) and sends a request to the server
in the form of a request method, URI, and protocol version, followed by a
message containing request modifiers, client information, and possible body
content. The server responds with a status line, including its protocol version
and a success or error code, followed by a message containing server
information, entity met information, and possible body content.

 

HTTP Aspects:

Methods

Status code

Request/Response Line

Message Handler

 

Methods:

There are mainly two basic
methods of HTTP protocol.

GET

POST

 

1.GET

 

In GET method only
limited amount of data can be sent, because data is sent in header.

GET method is not
secure in compare to POST method because data exposed in URL bar.

GET method is more
efficient and more used than POST method.

GET method can be
bookmarked.

GET method is
idempotent. That means second request will be ignored until the response of
first request will be delivered.

GET method send up to
1024 character only.

GET method can’t be
send binary data, audio, video or any type of image file.

GET method is basically used for
retrieving the information or data from the server using URL.

Anatomy of GET Method:

Name1=value1=value2=value3

In GET method, name and
value pairs are joined with equal sign and another pair of name and value are
joined with ampersand.

Example:

 

POST

POST:

In POST method large
amount of data can be sent because data can be sent in body part.

POST method is more
secure than GET method because data can’t be exposed in URL.

POST method is less
efficient and less used than GET method.

POST method can’t be
bookmarked.

POST method is
non-idempotent.

In POST method there is
no limit of data size to be sent.

In POST method we can
sent Binary and ASCII data.

POST method basically used
to send data or information on the server.

Example:

 

HEAD:

This method is almost similar to GET method but it does not return
the requested data. It is used to transfer header section, status line, server
response code etc.

HEAD is often used to check the following information:

Last-modified date of a document on the server for caching purpose.

Size of a document before downloading.

Server type

Type of requested Document.

 

 

HTTP REQUEST RESPONSE LINE:

Request structure of
the client:

message structure:

 

start line:

1)request method

2)request URI

3)HTTP version

 

 

 

 

 

 

1)Request method:

1)Get:

used for retrieving the info. or data from the server
using URL.

2) post:

Used to send data or info.to the server.

3) head

should not return message body in the response. Transfer
status line and header section.

4) connect:

Connection establish between client and server.

Example:

GET/index.html HTTP/1.1

Host :www.gmail.com

2)Request URI:

URI stands for uniform resource indentifier.It is used to
identify name and resources on the internet.

URI consist 2 parts:

1)before the colon( : ) denotes schema(protocol).2) and
the part after colon depend upon the schema.

Eg: http://www.onlinesbi.com

3) HTTP version:

define the version of http.

Eg: HTTP/0.9

 

A.  
Request Header Filed:

The
request-header fields allow the client to pass additional information about the
request, and about the client itself, to the server. These fields act as
request modifiers.

    There are of some
important Request-header fields:

·      
Accept-Charset

·      
Accept-Encoding

·      
Accept-Language

·      
Authorization

·      
Expect

·      
From

·      
Host

·      
If-Match

·      
If-Modified-Since

·      
If-None-Match

·      
If-Range

·      
If-Unmodified-Since

·      
Max-Forwards

·      
Proxy-Authorization

·      
Range

·      
Referer

·      
TE

·      
User-Agent

 

Example of Request Message:

GET /hello.htm HTTP/1.1

User-Agent: Mozilla/4.0 (compatible;
MSIE5.01; Windows NT)

 Host: www.example.com

Accept-Language: en-us

Accept-Encoding: gzip, deflate

Connection: Keep-Alive

 

 

 

 

 

 

 

 

 

 

 

 

HTTP Response Structure from the Web Server:-    

message structure:

 

 status line:

It contains :

1}HTTP version

        eg: HTTP /1.1

2}status code

        eg:202

3}reason phrase

        eg:accepted

example:  HTTP/1.1
202 Accepted

 

 

A.  
Response Header:

The response-header fields
allow the server to pass additional information about the response which cannot
be placed in the Status- Line. These header fields give information about the
server and about further access to the resource identified by the Request-URI.

A list of some important Request-header fields:

·       
Accept-Ranges

·       
Age

·       
ETag

·       
Location

·       
Proxy-Authenticate

·       
Retry-After

·       
Server

·       
Vary

·       
WWW-Authenticate

B.  
Message Status-line:

A Status-Line consists of the
protocol version followed by a numeric status code and its associated textual
phrase.

 

Example of Response Message:

   HTTP/1.1 200 OK

   Date: Mon, 27 Jul 2009 12:28:53 GMT

   Server: Apache/2.2.14 (Win32)

   Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT

   Content-Length: 88 Content-Type: text/html

   Connection: close