Explain HTTP ( Hyper Text transfer protocol )?

The top layer in network protocol is application layer.

Logically data transfer happens b/w applications and uses services from the other layers.

The World Wide Web has its own special protocol which applications like browser & web servers use to talk to each other.

HTTP is a protocol it is used because of it is

1)      Stateless

2)     Connectionless

TCP – is session oriented.
The server & client maintain a connection for the duration of a data exchange.

HTTP – has  no connect of session. i.e once a message has been sent and received the two machines forgot a bout each other.

Http sessions

under http there are four steps to communicating across the web.

1)    Make the connection.

2)    Request  a document

3)    Respond to a request

4)    Close the connection

Connection setup:

The browser opens a standard TCP connect to the server.
Port 80 is used by default but any port which is not required by another application can be used.


Browser Request :

Once the TCP connection is established , the browser requests a given document using its URL.

The command get tells the server , that the browser is attempting to retrieve a document

The document is assumed to be stored on the server and so the fully qualified address.

Browsers can be send a variety of other commands including post which sends from data to the server.

Server Response :

The web- server process can automatically insert information in to the header of a response.

Content – type :  Tells the browser how to process the document.

Location : Used to automatically redirect the browser to another URL.

Set cookie :  Set a Netscape cookie

The server response begins with a response code.

Close the Connection : 

The client and server can both close the connection. 
If another document is required a new connection must be opened.

Http error response codes (or) Error codes


Response code

Meaning

200 ok


 201 created


204 no content


400 bad request


404 not found


500 Internal Server error

503 service unavailable

·  It indicates that the message contains the requested data including all necessary headers.
·         The server has created a file which the browser should now attempt to load.
· The request was processed successfully but there was no data to return to the browser.
·  The request from the Client used invalid syntax and could not be processed.
·       Comment error response , indicates request was valid , the server could not find the document.
·     The server generated an error which it cannot handle.
·         The server is temporarily unable to handle requests.

Related

Web Technology 5388940538733299530

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item