0% found this document useful (0 votes)
7 views11 pages

Understanding HTTP Protocol Basics

HTTP uses TCP to establish a connection between a client and server. It exchanges HTTP messages in a stateless manner. The presentation covers HTTP overview, operation, requests, responses, and methods. HTTP requests contain a request line and header, while responses contain a status line, header, and requested data. Common HTTP methods are GET, POST, HEAD, PUT, and DELETE.

Uploaded by

api-3706009
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views11 pages

Understanding HTTP Protocol Basics

HTTP uses TCP to establish a connection between a client and server. It exchanges HTTP messages in a stateless manner. The presentation covers HTTP overview, operation, requests, responses, and methods. HTTP requests contain a request line and header, while responses contain a status line, header, and requested data. Common HTTP methods are GET, POST, HEAD, PUT, and DELETE.

Uploaded by

api-3706009
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

Http Presentation

Presented by:Manoj Kirar


PRN-060341076
Topics Covered
 Http Overview
 Http Operation
 Http Message
 Http Method

10/14/08 Topic: HTTP Presented by:Manoj Kirar 2


Http Overview
 Uses TCP:
1-client initiates TCP connection to serve
-generally port 80.
2-server accepts TCP connection from client
3-HTTP messages (application-layer
protocol messages) exchanged between
browser (client) and Web server (server).
4-TCP connection closed
10/14/08 Topic: HTTP Presented by:Manoj Kirar 3
HTTP overview (cont.)
 HTTP is “stateless”
1- Server maintains no information about
past client requests.
2- Aside:
Protocols that maintain “state” are complex!
• past history (state) must be maintained
• if server/client crashes, their views of
“state” may be inconsistent
10/14/08 Topic: HTTP Presented by:Manoj Kirar 4
Http Operation
1a. client initiates TCP
User enter some URL connection to HTTP server
on port 80
1b. HTTP server at host
waiting for TCP connection
at port 80 “accepts”
connection,notifying client

[Link] client sends HTTP


3. HTTP server receives request
Request message
message, forms response
(containing URL) into
message containing requested
TCP connection.
object, and sends message into
its socket

10/14/08 Topic: HTTP Presented by:Manoj Kirar 5


Http Operation (Cont.)

[Link] server closes TCP


connection.

[Link] client receives


response message
containing html file, displays
html.

10/14/08 Topic: HTTP Presented by:Manoj Kirar 6


Http Messages
 Two types of HTTP messages:
– Request
– Response

10/14/08 Topic: HTTP Presented by:Manoj Kirar 7


Http Request Message
 ASCII(human-readable form)
GET /somedir/[Link] HTTP/1.1
Request line Host: [Link]
User-agent: Mozilla/4.0

Header line

10/14/08 Topic: HTTP Presented by:Manoj Kirar 8


Method types
 HTTP/1.1
1- GET, POST, HEAD
2- PUT– uploads file in entity body to path
specifiedin URL field
3- DELETE – deletes file specified in the
URL field

10/14/08 Topic: HTTP Presented by:Manoj Kirar 9


Http Response Message
HTTP/1.1 200 OK
Connection: close
Status line(protocol status Server: Apache/1.3.0
Code) Content-Length: 6821
Content-Type: text/html

Header line

Data e.g. requested HTML file

10/14/08 Topic: HTTP Presented by:Manoj Kirar 10


10/14/08 Topic: HTTP Presented by:Manoj Kirar 11

You might also like