SlideShare a Scribd company logo
HTTP Protocol
Amanda Burrows
HTTP Protocol
 The HTTP protocol is used to send HTML
documents through the Internet. The HTTP
protocol sends the HTML documents in packets,
using TCP/IP. With each packet, the HTTP
protocol attaches a header, which contains
information such as the name and location of
the page being requested, the name and IP
address of the remote server that contains the
Web page, the IP address of the local client, the
HTTP version number, and the URL of the
referring page. This information is referred to as
the server variables.
Information
 The Hypertext Transfer Protocol (HTTP) is an application-
level protocol with the lightness and speed necessary for
distributed, collaborative, hypermedia information
systems. HTTP has been in use by the World-Wide Web
global information initiative since 1990.
 HTTP version 1.0 is a stateless protocol
 HTTP 1.1 is stateful
Improvements in HTTP 1.1
 Requests include a Host MIME header so that
one web server can easily serve different sites at
different URLs.
 Servers and browsers can exchange compressed
files and particular byte ranges of a document,
both of which can decrease network traffic.
 HTTP 1.1 is designed to work much better with
proxy servers
 HTTP 1.1 is a strict superset of HTTP 1.0, so
HTTP 1.1 web servers have no trouble
interacting with older browsers that speak only
HTTP 1.0
HTTP
HTTP, the Hypertext Transfer Protocol, is the
standard protocol for communication between
web browsers and web servers. HTTP specifies
how a client and server establish a connection,
how the client requests data from the server,
how the server responds to that request, and
finally how the connection is closed. HTTP
connections use the TCP/IP protocol for data
transfer.
Step 1
HTTP 1.0 is the currently accepted version of the
protocol. It uses MIME to encode data. The basic
protocol defines a sequence of four steps for each
request from a client to the server:
Making the connection. The client establishes a
TCP connection to the server, on port 80 by default;
other ports may be specified in the URL.
Step 2
Making a request. The client sends a
message to the server requesting the page at
a specified URL. The format of this request is
typically something like:
GET /index.html HTTP 1.0
Request-Line
The Request-Line begins with a method token, followed by the
Request-URI and the protocol version, and ending with CRLF.
The elements are separated by SP characters. No CR or LF are
allowed except in the final CRLF sequence.
Request-Line = Method SP Request-URI SP HTTP-Version CRLF
* Note that the difference between a Simple-Request and the
Request-Line of a Full-Request is the presence of the HTTP-
Version field and the availability of methods other than GET.
Method
The Method token indicates the method to be performed on the
resource identified by the Request-URI. The method is case-
sensitive.
Method = "GET" ;
| "HEAD" ;
| "POST" ;
| extension-method
extension-method = token
The list of methods acceptable by a specific resource can change
dynamically; the client is notified through the return code of the
response if a method is not allowed on a resource. Servers should
return the status code 501 (not implemented) if the method is
unrecognized or not implemented.
GET
 The GET method means retrieve whatever information is identified
by the Request-URI. If the Request-URI refers to a data-producing
process, it is the produced data which shall be returned as the
entity in the response and not the source text of the process, unless
that text happens to be the output of the process.
 The semantics of the GET method changes to a "conditional GET" if
the request message includes an If-Modified-Since header field. A
conditional GET method requests that the identified resource be
transferred only if it has been modified since the date given by the
If-Modified-Since header.
 The conditional GET method is intended to reduce network usage by
allowing cached entities to be refreshed without requiring multiple
requests or transferring unnecessary data.
Head
The HEAD method is identical to GET except that the server must
not return any Entity-Body in the response. The metainformation
contained in the HTTP headers in response to a HEAD request
should be identical to the information sent in response to a GET
request. This method can be used for obtaining metainformation
about the resource identified by the Request-URI without
transferring the Entity-Body itself. This method is often used for
testing hypertext links for validity, accessibility, and recent
modification.
There is no "conditional HEAD" request analogous to the conditional
GET. If an If-Modified-Since header field is included with a HEAD
request, it should be ignored.
Post
The POST method is used to request that the
destination server accept the entity enclosed in the
request as a new subordinate of the resource identified
by the Request-URI in the Request-Line. POST is
designed to allow a uniform method to cover the
following functions:
 Annotation of existing resources;
 Posting a message to a bulletin board, newsgroup,
mailing list, or similar group of articles;
 Providing a block of data, such as the result of
submitting a form, to a data-handling process;
 Extending a database through an append operation.
Step 3
The response. The server sends a
response to the client. The response
begins with a response code, followed by
MIME header information, then a blank
line, then the requested document or an
error message. Assuming the requested
file is found, a typical response looks like
this:
Step 3 (cont)
HTTP 1.0 200 OK
Server: NCSA/1.4.2
MIME-version: 1.0
Content-type: text/html
Content-length: 107
<html>
<Head>
<Title>
A Sample HTML file
</Title>
</Head>
<body>
The rest of the document goes here
</body>
</html>
Step 4
Closing the connection. Either client or the
server or both close the connection. Thus, a
separate network connection is used for each
request. If the client reconnects, the server
retains no memory of past requests is called
stateless; in contrast, a stateful protocol such
as FTP can process many requests before the
connection is closed. The lack of state is both
a strength and a weakness of HTTP.
Example of connections…
Imagine that you are browsing a Web page and have just clicked on a link
whose URL is http://www.cob.mnsu.edu/faculty.html. The following
sequence of events will take place to let you access that page:
• Your Web browser will determine the URL associated with the link and will
extract the name of the machine to which it must connect – in this case,
www.cob.mnsu.edu.
• The browser will use the TCP/IP protocols to establish a connection across
the Internet between your computer and www.cob.mnsu.edu.
• When the connection between these two machines has been established,
your browser will send a special HTTP message called GET, which indicates
that it wants the destination machine to retrieve a page. The GET
command contains the name of the desired page, in this case “faculty.html.”
• The remote machine www.cob.mnsu.edu locates the file name in the GET
message, reads it, copies it, and returns the copy to your browser, again
using TCP/IP and the Internet.
• Your browser receives the page and displays its contents on your screen.
Multipurpose Internet Mail Extensions
 MIME is an open standard for sending
multipart, multimedia data through
Internet email.
 Originally intended for email
 Content types are classified at two levels:
a type and a subtype
HTTP communication
 Most HTTP communication is initiated by a
user agent and consists of a request to be
applied to a resource on some original
server.
 A more complicated situation occurs when
one or more intermediaries are present in
the request/response chain.
Three common forms:
 Proxy – is a forwarding agend, receiving
requests for a URI in its absolute form, rewriting
all or parts of the message, and forwarding the
reformatted request toward the server identified
by the URI
 Gateway – is a receiving agent, acting as a layer
above some other server and, if necessary,
translating the requests to the underlying
server’s protocol
 Tunnel – acts as a relay point between two
connections without changing the messages
Any Questions??

More Related Content

PPTX
PPT
Hyper text transport protocol
PPT
Http VS. Https
PPTX
Hypertex transfer protocol
PPTX
PPTX
HTTP Protocol Basic
PPTX
Compute rNetwork.pptx
PPT
Http
Hyper text transport protocol
Http VS. Https
Hypertex transfer protocol
HTTP Protocol Basic
Compute rNetwork.pptx
Http

Similar to HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt (20)

PPTX
HTTP Protocol.pptx network and security protocol
PPTX
http presentation 1.pptx
PDF
Introduction to HTTP
PPTX
Http Introduction
PPTX
www and http services
PPTX
The HTTP and Web
PDF
HTTP Definition and Basics.
PDF
Communicating on the web
PDF
Ch2 the application layer protocols_http_3
PPTX
Http and its Applications
PPTX
An Introduction to HTTP
PPT
Http request&response
PPTX
Http protocol
PPTX
Module 5.pptx HTTP protocol on optical and wireless communication
PPTX
PPT
KMUTNB - Internet Programming 2/7
PPT
HTTP.ppt
PPT
Hypertext Transfer Protocol Hypertext Transfer Protocol
PPT
HTTP.ppt
HTTP Protocol.pptx network and security protocol
http presentation 1.pptx
Introduction to HTTP
Http Introduction
www and http services
The HTTP and Web
HTTP Definition and Basics.
Communicating on the web
Ch2 the application layer protocols_http_3
Http and its Applications
An Introduction to HTTP
Http request&response
Http protocol
Module 5.pptx HTTP protocol on optical and wireless communication
KMUTNB - Internet Programming 2/7
HTTP.ppt
Hypertext Transfer Protocol Hypertext Transfer Protocol
HTTP.ppt
Ad

Recently uploaded (20)

PPTX
Business Ppt On Nestle.pptx huunnnhhgfvu
PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PPTX
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
PPTX
IB Computer Science - Internal Assessment.pptx
PPT
Reliability_Chapter_ presentation 1221.5784
PDF
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
PPTX
Database Infoormation System (DBIS).pptx
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
PDF
.pdf is not working space design for the following data for the following dat...
PDF
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
PDF
Lecture1 pattern recognition............
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPTX
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPTX
Introduction to machine learning and Linear Models
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PPTX
1_Introduction to advance data techniques.pptx
Business Ppt On Nestle.pptx huunnnhhgfvu
IBA_Chapter_11_Slides_Final_Accessible.pptx
Introduction-to-Cloud-ComputingFinal.pptx
mbdjdhjjodule 5-1 rhfhhfjtjjhafbrhfnfbbfnb
IB Computer Science - Internal Assessment.pptx
Reliability_Chapter_ presentation 1221.5784
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
Database Infoormation System (DBIS).pptx
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
.pdf is not working space design for the following data for the following dat...
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
Lecture1 pattern recognition............
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
Acceptance and paychological effects of mandatory extra coach I classes.pptx
Introduction to machine learning and Linear Models
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
1_Introduction to advance data techniques.pptx
Ad

HTTPProtocol HTTPProtocol.pptHTTPProtocol.ppt

  • 2. HTTP Protocol  The HTTP protocol is used to send HTML documents through the Internet. The HTTP protocol sends the HTML documents in packets, using TCP/IP. With each packet, the HTTP protocol attaches a header, which contains information such as the name and location of the page being requested, the name and IP address of the remote server that contains the Web page, the IP address of the local client, the HTTP version number, and the URL of the referring page. This information is referred to as the server variables.
  • 3. Information  The Hypertext Transfer Protocol (HTTP) is an application- level protocol with the lightness and speed necessary for distributed, collaborative, hypermedia information systems. HTTP has been in use by the World-Wide Web global information initiative since 1990.  HTTP version 1.0 is a stateless protocol  HTTP 1.1 is stateful
  • 4. Improvements in HTTP 1.1  Requests include a Host MIME header so that one web server can easily serve different sites at different URLs.  Servers and browsers can exchange compressed files and particular byte ranges of a document, both of which can decrease network traffic.  HTTP 1.1 is designed to work much better with proxy servers  HTTP 1.1 is a strict superset of HTTP 1.0, so HTTP 1.1 web servers have no trouble interacting with older browsers that speak only HTTP 1.0
  • 5. HTTP HTTP, the Hypertext Transfer Protocol, is the standard protocol for communication between web browsers and web servers. HTTP specifies how a client and server establish a connection, how the client requests data from the server, how the server responds to that request, and finally how the connection is closed. HTTP connections use the TCP/IP protocol for data transfer.
  • 6. Step 1 HTTP 1.0 is the currently accepted version of the protocol. It uses MIME to encode data. The basic protocol defines a sequence of four steps for each request from a client to the server: Making the connection. The client establishes a TCP connection to the server, on port 80 by default; other ports may be specified in the URL.
  • 7. Step 2 Making a request. The client sends a message to the server requesting the page at a specified URL. The format of this request is typically something like: GET /index.html HTTP 1.0
  • 8. Request-Line The Request-Line begins with a method token, followed by the Request-URI and the protocol version, and ending with CRLF. The elements are separated by SP characters. No CR or LF are allowed except in the final CRLF sequence. Request-Line = Method SP Request-URI SP HTTP-Version CRLF * Note that the difference between a Simple-Request and the Request-Line of a Full-Request is the presence of the HTTP- Version field and the availability of methods other than GET.
  • 9. Method The Method token indicates the method to be performed on the resource identified by the Request-URI. The method is case- sensitive. Method = "GET" ; | "HEAD" ; | "POST" ; | extension-method extension-method = token The list of methods acceptable by a specific resource can change dynamically; the client is notified through the return code of the response if a method is not allowed on a resource. Servers should return the status code 501 (not implemented) if the method is unrecognized or not implemented.
  • 10. GET  The GET method means retrieve whatever information is identified by the Request-URI. If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process.  The semantics of the GET method changes to a "conditional GET" if the request message includes an If-Modified-Since header field. A conditional GET method requests that the identified resource be transferred only if it has been modified since the date given by the If-Modified-Since header.  The conditional GET method is intended to reduce network usage by allowing cached entities to be refreshed without requiring multiple requests or transferring unnecessary data.
  • 11. Head The HEAD method is identical to GET except that the server must not return any Entity-Body in the response. The metainformation contained in the HTTP headers in response to a HEAD request should be identical to the information sent in response to a GET request. This method can be used for obtaining metainformation about the resource identified by the Request-URI without transferring the Entity-Body itself. This method is often used for testing hypertext links for validity, accessibility, and recent modification. There is no "conditional HEAD" request analogous to the conditional GET. If an If-Modified-Since header field is included with a HEAD request, it should be ignored.
  • 12. Post The POST method is used to request that the destination server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. POST is designed to allow a uniform method to cover the following functions:  Annotation of existing resources;  Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles;  Providing a block of data, such as the result of submitting a form, to a data-handling process;  Extending a database through an append operation.
  • 13. Step 3 The response. The server sends a response to the client. The response begins with a response code, followed by MIME header information, then a blank line, then the requested document or an error message. Assuming the requested file is found, a typical response looks like this:
  • 14. Step 3 (cont) HTTP 1.0 200 OK Server: NCSA/1.4.2 MIME-version: 1.0 Content-type: text/html Content-length: 107 <html> <Head> <Title> A Sample HTML file </Title> </Head> <body> The rest of the document goes here </body> </html>
  • 15. Step 4 Closing the connection. Either client or the server or both close the connection. Thus, a separate network connection is used for each request. If the client reconnects, the server retains no memory of past requests is called stateless; in contrast, a stateful protocol such as FTP can process many requests before the connection is closed. The lack of state is both a strength and a weakness of HTTP.
  • 16. Example of connections… Imagine that you are browsing a Web page and have just clicked on a link whose URL is http://www.cob.mnsu.edu/faculty.html. The following sequence of events will take place to let you access that page: • Your Web browser will determine the URL associated with the link and will extract the name of the machine to which it must connect – in this case, www.cob.mnsu.edu. • The browser will use the TCP/IP protocols to establish a connection across the Internet between your computer and www.cob.mnsu.edu. • When the connection between these two machines has been established, your browser will send a special HTTP message called GET, which indicates that it wants the destination machine to retrieve a page. The GET command contains the name of the desired page, in this case “faculty.html.” • The remote machine www.cob.mnsu.edu locates the file name in the GET message, reads it, copies it, and returns the copy to your browser, again using TCP/IP and the Internet. • Your browser receives the page and displays its contents on your screen.
  • 17. Multipurpose Internet Mail Extensions  MIME is an open standard for sending multipart, multimedia data through Internet email.  Originally intended for email  Content types are classified at two levels: a type and a subtype
  • 18. HTTP communication  Most HTTP communication is initiated by a user agent and consists of a request to be applied to a resource on some original server.  A more complicated situation occurs when one or more intermediaries are present in the request/response chain.
  • 19. Three common forms:  Proxy – is a forwarding agend, receiving requests for a URI in its absolute form, rewriting all or parts of the message, and forwarding the reformatted request toward the server identified by the URI  Gateway – is a receiving agent, acting as a layer above some other server and, if necessary, translating the requests to the underlying server’s protocol  Tunnel – acts as a relay point between two connections without changing the messages