chapter 24

25
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000 Chapter 24 Hypertext Transfer Protocol (HTTP)

Upload: juliet

Post on 07-Jan-2016

25 views

Category:

Documents


0 download

DESCRIPTION

Chapter 24. Hypertext Transfer Protocol (HTTP). CONTENTS. HTTP TRANSACTION REQUEST MESSAGE RESPONSE MESSAGE HEADER EXAMPLES SOME OTHER FEATURES. HTTP uses the services of TCP on well-known port 80. 24.1. HTTP TRANSACTION. Figure 24-1. HTTP transaction. Figure 24-2. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Chapter 24

HypertextTransfer Protocol

(HTTP)

Page 2: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

CONTENTSCONTENTS

• HTTP TRANSACTION• REQUEST MESSAGE• RESPONSE MESSAGE• HEADER• EXAMPLES• SOME OTHER FEATURES

Page 3: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

HTTP uses the services of HTTP uses the services of TCP on well-known port 80.TCP on well-known port 80.

Page 4: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

HTTPTRANSACTION

24.124.1

Page 5: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Figure 24-1

HTTP transaction

Page 6: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Figure 24-2

Message categories

Page 7: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

24.224.2

REQUESTMESSAGE

Page 8: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Figure 25-3

Request message

Page 9: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Figure 24-4

Request line

Page 10: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Figure 24-5

URL

Page 11: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

RESPONSEMESSAGE

24.324.3

Page 12: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Figure 24-6

Response message

Page 13: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Figure 24-7

Status line

Status code: Same format as FTP responses (three digits)

Page 14: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

HEADER

24.424.4

Page 15: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Figure 24-8

Header format

Page 16: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Figure 24-9 Headers

Page 17: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

EXAMPLES

24.524.5

Page 18: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Example 1Example 1

This example retrieves a document. We use the GET method to retrieve an image with the path /usr/bin/image1.

Page 19: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Figure 24-10 Example 1

Page 20: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Example 2Example 2

This example retrieves information about a document. We use the HEAD method to retrieve information about an HTML document (see Chapter 25)

Page 21: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Figure 24-11

Example 2

Page 22: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Example 3Example 3

In this example, the client wants to send input data to the server. We use the POST method.

Page 23: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

Figure 24-12

Example 3

Page 24: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

SOME OTHER FEATURES

24.624.6

Page 25: Chapter 24

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000

HTTP version 1.1 HTTP version 1.1 specifies a persistent specifies a persistent connection by default.connection by default.