ch24

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

Upload: tejindershami

Post on 13-Dec-2014

147 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Ch24

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

Chapter 24

HypertextTransfer Protocol

(HTTP)

Page 2: Ch24

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

CONTENTSCONTENTS

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

Page 3: Ch24

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: Ch24

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

HTTPTRANSACTION

24.124.1

Page 5: Ch24

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

Figure 24-1

HTTP transaction

Page 6: Ch24

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

Figure 24-2

Message categories

Page 7: Ch24

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

24.224.2

REQUESTMESSAGE

Page 8: Ch24

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

Figure 25-3

Request message

Page 9: Ch24

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

Figure 24-4

Request line

Page 10: Ch24

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

Figure 24-5

URL

Page 11: Ch24

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

RESPONSEMESSAGE

24.324.3

Page 12: Ch24

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

Figure 24-6

Response message

Page 13: Ch24

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

Figure 24-7

Status line

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

Page 14: Ch24

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

HEADER

24.424.4

Page 15: Ch24

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

Figure 24-8

Header format

Page 16: Ch24

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

Figure 24-9 Headers

Page 17: Ch24

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

EXAMPLES

24.524.5

Page 18: Ch24

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: Ch24

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

Figure 24-10 Example 1

Page 20: Ch24

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: Ch24

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

Figure 24-11

Example 2

Page 22: Ch24

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: Ch24

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

Figure 24-12

Example 3

Page 24: Ch24

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

SOME OTHER FEATURES

24.624.6

Page 25: Ch24

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.