chapter 24
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 PresentationTRANSCRIPT
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Chapter 24
HypertextTransfer Protocol
(HTTP)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
CONTENTSCONTENTS
• HTTP TRANSACTION• REQUEST MESSAGE• RESPONSE MESSAGE• HEADER• EXAMPLES• SOME OTHER FEATURES
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.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
HTTPTRANSACTION
24.124.1
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 24-1
HTTP transaction
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 24-2
Message categories
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
24.224.2
REQUESTMESSAGE
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 25-3
Request message
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 24-4
Request line
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 24-5
URL
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
RESPONSEMESSAGE
24.324.3
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 24-6
Response message
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 24-7
Status line
Status code: Same format as FTP responses (three digits)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
HEADER
24.424.4
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 24-8
Header format
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 24-9 Headers
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
EXAMPLES
24.524.5
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.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 24-10 Example 1
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)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 24-11
Example 2
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.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 24-12
Example 3
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
SOME OTHER FEATURES
24.624.6
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.