TAILIEUCHUNG - Bài giảng Chapter 6: Application Layer
Chapter 6: Application Layer. Overview of Transport Layer, HTPP and Web, domain name, electrical Email, file transfer. Request and response messages, request and status lines, header format, domain name space, domain names and labels, query and response messages, header format | Chapter 6 Application Layer Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Outline Overview of Transport Layer HTPP and Web Domain name Electrical Email File transfer 2. HTTP The Hypertext Transfer Protocol (HTTP) is a protocol used mainly to access data on the World Wide Web. HTTP functions as a combination of FTP and SMTP. HTTP Transaction Persistent Versus Nonpersistent Connection Topics discussed in this section: HTTP uses the services of TCP on well-known port 80. Note HTTP transaction Request and response messages Request and status lines Methods Status codes Status codes (continued) Header format General headers Request headers Response headers Entity headers This example retrieves a document. We use the GET method to retrieve an image with the path /usr/bin/image1. The request line shows the method (GET), the URL, and the HTTP version (). The header has two lines that show that the client can accept images in the GIF or JPEG format. The request does not have a body. The response message contains the status line and four lines of header. The header lines define the date, server, MIME version, and length of the document. The body of the document follows the header (see Figure ). Example Figure In this example, the client wants to send data to the server. We use the POST method. The request line shows the method (POST), URL, and HTTP version (). There are four lines of headers. The request body contains the input information. The response message contains the status line and four lines of headers. The created document, which is a CGI document, is included as the body (see Figure ). Example Figure HTTP uses ASCII characters. A client can directly connect to a server using TELNET, which logs into port 80 (see next slide). The next three lines show that the connection is successful. We then type three lines. The first shows the request line (GET method), the second is the header (defining the .
đang nạp các trang xem trước