HTTP notes

download HTTP notes

of 29

Transcript of HTTP notes

  • 7/28/2019 HTTP notes

    1/29

    TCP/IP Protocol Suite 1

    Upon completion you will be able to:

    World Wide Web:World Wide Web:HTTPHTTP

    Understand the components of a browser and a server

    Understand the function of the URL and cookies

    Understand how HTML is related to static documents

    Understand how CGI is related to dynamic documents

    Understand how Java is related to active documents

    Know how HTTP accesses data on the WWW

    Objectives

  • 7/28/2019 HTTP notes

    2/29

    TCP/IP Protocol Suite 2

    1 ARCHITECTURE

    The WWW is a distributed client-server service, in which a client using aThe WWW is a distributed client-server service, in which a client using abrowser can access a service using a server. The service provided isbrowser can access a service using a server. The service provided is

    distributed over many locations called sites.distributed over many locations called sites.

    The topics discussed in this section include:The topics discussed in this section include:

    Client (Browser)Client (Browser)

    ServerServer

    Uniform Resource Locator (URL)Uniform Resource Locator (URL)

    CookiesCookies

  • 7/28/2019 HTTP notes

    3/29

    TCP/IP Protocol Suite 3

    Figure 1 Architecture of WWW

  • 7/28/2019 HTTP notes

    4/29

    TCP/IP Protocol Suite 4

    Figure 2 Browser

  • 7/28/2019 HTTP notes

    5/29

    TCP/IP Protocol Suite 5

    Figure 3 URL

  • 7/28/2019 HTTP notes

    6/29

    TCP/IP Protocol Suite 6

    2 WEB DOCUMENTS

    The documents in the WWW can be grouped into three broad categories:The documents in the WWW can be grouped into three broad categories:static, dynamic, and active. The category is based on the time thestatic, dynamic, and active. The category is based on the time the

    contents of the document are determined.contents of the document are determined.

    The topics discussed in this section include:The topics discussed in this section include:

    Static DocumentsStatic Documents

    Dynamic DocumentsDynamic Documents

    Active DocumentsActive Documents

  • 7/28/2019 HTTP notes

    7/29

  • 7/28/2019 HTTP notes

    8/29

    TCP/IP Protocol Suite 8

    Figure 5 Boldface tags

  • 7/28/2019 HTTP notes

    9/29

    TCP/IP Protocol Suite 9

    Figure 6 Effect of boldface tags

  • 7/28/2019 HTTP notes

    10/29

    TCP/IP Protocol Suite 10

    Figure 7 Beginning and ending tags

  • 7/28/2019 HTTP notes

    11/29

    TCP/IP Protocol Suite 11

    Figure 8 Dynamic document using CGI

  • 7/28/2019 HTTP notes

    12/29

    TCP/IP Protocol Suite 12

    Figure 9 Dynamic document using server-site script

  • 7/28/2019 HTTP notes

    13/29

    TCP/IP Protocol Suite 13

    Dynamic documents are sometimes

    referred to as server-site dynamicdocuments.

    Note:Note:

  • 7/28/2019 HTTP notes

    14/29

    TCP/IP Protocol Suite 14

    Figure 10 Active document using Java applet

  • 7/28/2019 HTTP notes

    15/29

    TCP/IP Protocol Suite 15

    Figure 11 Active document using client-site script

  • 7/28/2019 HTTP notes

    16/29

    TCP/IP Protocol Suite 16

    Active documents are sometimes

    referred to as client-site dynamicdocuments.

    Note:Note:

  • 7/28/2019 HTTP notes

    17/29

    TCP/IP Protocol Suite 17

    3 HTTP

    The Hypertext Transfer Protocol (HTTP) is a protocol used mainly toThe Hypertext Transfer Protocol (HTTP) is a protocol used mainly toaccess data on the World Wide Web. HTTP functions like a combinationaccess data on the World Wide Web. HTTP functions like a combination

    of FTP and SMTP.of FTP and SMTP.

    The topics discussed in this section include:The topics discussed in this section include:

    HTTP TransactionHTTP Transaction

    Persistent versus Nonpersistent ConnectionPersistent versus Nonpersistent Connection

    Proxy ServerProxy Server

  • 7/28/2019 HTTP notes

    18/29

    TCP/IP Protocol Suite 18

    HTTP uses the services of TCP on

    well-known port 80.

    Note:Note:

  • 7/28/2019 HTTP notes

    19/29

    TCP/IP Protocol Suite 19

    Figure 12 HTTP transaction

  • 7/28/2019 HTTP notes

    20/29

    TCP/IP Protocol Suite 20

    Figure 13 Request and response messages

  • 7/28/2019 HTTP notes

    21/29

    TCP/IP Protocol Suite 21

    Figure 14 Request and status lines

  • 7/28/2019 HTTP notes

    22/29

    TCP/IP Protocol Suite 22

    Table 1Table 1 MethodsMethods

  • 7/28/2019 HTTP notes

    23/29

    TCP/IP Protocol Suite 23

    Table 2Table 2 Status codesStatus codes

  • 7/28/2019 HTTP notes

    24/29

    TCP/IP Protocol Suite 24

    Table 2Table 2 Status codes (continued)Status codes (continued)

  • 7/28/2019 HTTP notes

    25/29

    TCP/IP Protocol Suite 25

    Figure 15 Header format

  • 7/28/2019 HTTP notes

    26/29

    TCP/IP Protocol Suite 26

    Table 3Table 3 General headersGeneral headers

  • 7/28/2019 HTTP notes

    27/29

    TCP/IP Protocol Suite 27

    Table 4Table 4 Request headersRequest headers

  • 7/28/2019 HTTP notes

    28/29

    TCP/IP Protocol Suite 28

    Table 5Table 5 Response headersResponse headers

  • 7/28/2019 HTTP notes

    29/29

    TCP/IP Protocol Suite 29

    Table 6Table 6Entity headersEntity headers