A Closer Look at HTTP - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

A Closer Look at HTTP

Description:

HTTP (HyperText Transfer Protocol) governs requests and responses between the ... Keyword sp absolute path sp HTTP/ version. Keyword is GET for Retrievals. GET ... – PowerPoint PPT presentation

Number of Views:211
Avg rating:3.0/5.0
Slides: 15
Provided by: WayneS2
Category:
Tags: http | closer | http | look

less

Transcript and Presenter's Notes

Title: A Closer Look at HTTP


1
A Closer Look at HTTP
  • HyperText Transfer Protocol

2
HTTP A Closer Look
  • World Wide Web Standards
  • HTTP (HyperText Transfer Protocol) governs
    requests and responses between the browser and
    the webserver application program
  • HTML (HyperText Markup Language) governs the
    structure of the HTML webpage

HTTP
Browser
Webserver Program
HTML
3
HTTP A Closer Look
  • Sample HTTP Request Line
  • All text, often only a single line
  • Keywordabsolute pathHTTP/ version
  • Keyword is GET for Retrievals
  • GET must be capitalized
  • Absolute path is URL without http//hostname

GET /report1/home.htm HTTP/1.1
Absolute Path
4
HTTP A Closer Look
New
  • Sample HTTP Request Header
  • Although the book only discusses the
    request-line, if only the absolute path is give,
    the request line is supposed to be followed by a
    header line naming the host.
  • So if the host is puka.hawaii.edu, the
    request-line and header would be (where CRLF is
    carriage return followed by line feed)

GET /report1/home.htm HTTP/1.1CRLF Hostpuka.haw
aii.eduCRLF
5
HTTP A Closer Look
  • Sample HTTP Response Message
  • Header is multiple lines of text
  • Each ends with CRLF

HTTP/1.1 200 OKCRLFDate Tuesday, 20-JAN-1999
183215 GMTCRLFServer name of server
softwareCRLFMIME-version 1.0CRLFContent-typ
e text/plainCRLFCRLFFile to be downloaded.
6
HTTP A Closer Look
  • Sample HTTP Response Message
  • 200 is a code for a successful retrieval,
    followed by the humanly readable code, OK

HTTP/1.1 200 OKCRLFDate Tuesday, 20-JAN-1999
183215 GMTCRLFServer name of server
softwareCRLFMIME-version 1.0CRLFContent-typ
e text/plainCRLFCRLFFile to be downloaded.
7
HTTP A Closer Look
  • Sample HTTP Response Message
  • There are other codes, indicating errors, such as
    404
  • Followed by a humanly readable code, such as,
    host not found

HTTP/1.1 404 Host not FoundCRLFDate Tuesday,
20-JAN-1999 183215 GMTCRLFServer name of
server softwareCRLFMIME-version
1.0CRLFContent-type text/plainCRLFCRLFFi
le to be downloaded.
8
HTTP A Closer Look
  • Sample HTTP Response Message
  • MIME-version and Content-type tell the type of
    file being retrieved
  • For HTML document, text/plain

HTTP/1.1 200 OKCRLFDate Tuesday, 20-JAN-1999
183215 GMTCRLFServer name of server
softwareCRLFMIME-version 1.0CRLFContent-typ
e text/plainCRLFCRLFFile to be downloaded.
9
HTTP A Closer Look
  • HTML Pages Contain Text
  • To be displayed
  • HTML Pages Contain Tags
  • Some tags say place a graphic here, place a
    JAVA applet in a box here, etc.
  • For instance, the tag says
    Get file big.jpg and place it here in the HTML
    document
  • Graphics, Java programs, etc. are separate files

10
HTTP A Closer Look
  • Downloading a page may require several
    downloads
  • One for the HTML document
  • One each for the other files it calls for

HTML
App. java
1
File Downloads
Big. jpg
Webserver
User PC
2
3
11
HTTP A Closer Look
  • Each download requires a separate HTTP
    request-response cycle!
  • So downloading complex webpages may require many
    HTTP request-response cycles

HTTP Request-Response Cycle 1
HTML
App. java
Big. jpg
Webserver
User PC
2
3
12
HTTP A Closer Look
  • How Many HTTP messages will be created to
    download the three files?
  • 3 HTTP request-response cycles
  • 2 HTTP messages per cycle (request and response)
  • 6 HTTP messages total

HTML
App. java
HTTP Request-Response Cycle 1
Big. jpg
Webserver
User PC
2
3
13
HTTP A Closer Look
  • HTTP is Unreliable
  • There is no error detection and correction for
    transmission errors
  • This helps makes HTTP simple, allowing browsers
    and webserver application programs to be simple
    and inexpensive
  • As we will see later, TCP at the transport layer
    is reliable, offering error detection and
    correction
  • TCP gives HTTP clean data, so there is no need
    for HTTP to do error checking

14
HTTP A Closer Look
  • HTTP is Connectionless
  • No connection (agreement to communicate) is made
    between the browser and webserver application
    before an HTTP message is sent
  • Like sending a letter or an E-mail message
    (connectionless) as compared to taking on the
    telephone, where a conversation (connection) must
    be opened, managed, and closed

HTTPRequest
Browser
Webserver Application
Write a Comment
User Comments (0)
About PowerShow.com