通信網(wǎng)絡(luò)技術(shù)課件:Chapter 7 Application Layer2_第1頁
通信網(wǎng)絡(luò)技術(shù)課件:Chapter 7 Application Layer2_第2頁
通信網(wǎng)絡(luò)技術(shù)課件:Chapter 7 Application Layer2_第3頁
通信網(wǎng)絡(luò)技術(shù)課件:Chapter 7 Application Layer2_第4頁
通信網(wǎng)絡(luò)技術(shù)課件:Chapter 7 Application Layer2_第5頁
已閱讀5頁,還剩31頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、Chapter 7 Application LayerUpon completion you will be able to:7.3 World Wide Web:HTTP 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 h

2、ow Java is related to active documents Know how HTTP accesses data on the WWWObjectives TCP/IP Protocol Suite17.3.1 ARCHITECTUREThe WWW is a distributed client-server service, in which a client using a browser can access a service using a server. The service provided is distributed over many locatio

3、ns called sites.The topics discussed in this section include:Client (Browser) Server Uniform Resource Locator (URL) Cookies 2Figure 7.47 Architecture of WWW3Figure 7.48 Browser4Figure 7.49 URL57.3.2 WEB DOCUMENTSThe documents in the WWW can be grouped into three broad categories: static, dynamic, an

4、d active. The category is based on the time the contents of the document are determined. The topics discussed in this section include:Static Documents Dynamic Documents Active Documents 6Figure 7.50 Static document7Figure 7.51 Boldface tagsTCP/IP Protocol Suite8Figure 7.52 Effect of boldface tags9Fi

5、gure 7.53 Beginning and ending tags10Figure 7.54 Dynamic document using CGI11Figure 7.55 Dynamic document using server-site script12Dynamic documents are sometimes referred to as server-site dynamic documents.Note:13Figure 7.56 Active document using Java applet14Figure 7.57 Active document using cli

6、ent-site script15Active documents are sometimes referred to as client-site dynamic documents.Note:167.3.3 HTTPThe Hypertext Transfer Protocol (HTTP) is a protocol used mainly to access data on the World Wide Web. HTTP functions like a combination of FTP and SMTP. The topics discussed in this section

7、 include:HTTP Transaction Persistent versus Nonpersistent Connection Proxy Server 17HTTP uses the services of TCP on well-known port 80.Note:18Figure 7.58 HTTP transaction19Figure 7.59 Request and response messages20Figure 7.60 Request and status lines21Table 7.9 Methods22Table 7.10 Status codes23Ta

8、ble 7.10 Status codes (continued)24Figure 7.61 Header format25Table 7.11 General headers26Table 7.12 Request headers27Table 7.13 Response headers28Table 7.14 Entity headers29This example retrieves a document. We use the GET method to retrieve an image with the path /usr/bin/image1. The request line

9、shows the method (GET), the URL, and the HTTP version (1.1). 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 lineand four lines of header. The header lines define the date, serv

10、er, MIME version, and length of the document. The body of the document follows the header (see Figure 22.16).Example 5See Next Slide30Figure 7.62 Example 131In 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 v

11、ersion (1.1). 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 22.17).Example 6See Next Slide32Figure 7.63 Exam

12、ple 233HTTP uses ASCII characters. A client can directly connect to a server using TELNET, which logs into port 80. The next three lines shows 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 host), the

13、 third is a blank terminating the request. The server response is seven lines starting with the status line. The blank line at the end terminates the server response. The file of 14230 lines is received after the blank line (not shown here). The last line is the output by the client.Example 7See Next Slide34$ telnet 80Trying 04.Connected to (04).Escape character is .GET /engcs/compsci/forouzan HTTP/1.1From: forouzanbehrouzHTTP/1.1 200 OKDate: Thu, 28 Oct 2004 16:27:46 GMTServer: Apache/1.3.9 (Unix) ApacheJServ/1.1.2 PHP/4.1.2 PHP/3.0.18M

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論