计算机网络HTTP实验指导 Wireshark Labs: HTTP

实验一 The Basic HTTP GET/response interaction

  1. Is your browser running HTTP version 1.0 or 1.1?  What version of HTTP is the server running?

browser running HTTP version1.1

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

version of HTTP is the server running1.1

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

2. What languages (if any) does your browser indicate that it can accept to the server?

Accept - Language:zh-CN\r\n

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

3. What is the IP address of your computer?  Of the gaia.cs.umass.edu server?

My computer IP: 192.168.0.107

the gaia.cs.umass.edu server IP: 128.119.245.12

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

4. What is the status code returned from the server to your browser?

状态码:200

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

5. When was the HTML file that you are retrieving last modified at the server?

Last-Modified: Sun, 29 Mar 2020 05:59:04 GMT\r\n

 

计算机网络HTTP实验指导 Wireshark Labs: HTTP

6. How many bytes of content are being returned to your browser?

Capture Length: 552 bytes (4416 bits)

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

7. By inspecting the raw data in the packet content window, do you see any headers within the data that are not displayed in the packet-listing window?  If so, name one.

有,content-length

计算机网络HTTP实验指导 Wireshark Labs: HTTP

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

 

 

实验二The HTTP CONDITIONAL GET/response interaction

8.Inspect the contents of the first HTTP GET request from your browser to the server.  Do you see an “IF-MODIFIED-SINCE” line in the HTTP GET?

第一次没有出现

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

9. Inspect the contents of the server response. Did the server explicitly return the contents of the file?   How can you tell?

明确了,给出了length和type,text data

计算机网络HTTP实验指导 Wireshark Labs: HTTP

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

 

10. Now inspect the contents of the second HTTP GET request from your browser to the server.  Do you see an “IF-MODIFIED-SINCE:” line in the HTTP GET? If so, what information follows the “IF-MODIFIED-SINCE:” header?

有,If-Modified-Since: Sun, 29 Mar 2020 05:59:04 GMT\r\n

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

11. What is the HTTP status code and phrase returned from the server in response to this second HTTP GET?  Did the server explicitly return the contents of the file?   Explain.

Status Code: 304

Response Phrase: Not Modified

第二次服务器没有显式地返回文件内容,在返回消息中未涉及Content信息。缓存中已经存在,服务器不会再返回内容。(304 告诉客户端其本地cache 的页面是最新的,于是客户端就可以直接从本地加载页面了,这样在网络上传输的数据就会大大减少,同时也减轻了服务器的负担。)

计算机网络HTTP实验指导 Wireshark Labs: HTTP

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

 

实验三 Retrieving Long Documents

12.How many HTTP GET request messages did your browser send?  Which packet number in the trace contains the GET message for the Bill or Rights?

5个  47

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

13. Which packet number in the trace contains the status code and phrase associated with the response to the HTTP GET request?

57  61

14. What is the status code and phrase in the response?

Status Code: 200

Response Phrase: OK

Status Code: 404

Response Phrase: Not Found

计算机网络HTTP实验指导 Wireshark Labs: HTTP

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

 

15. How many data-containing TCP segments were needed to carry the single HTTP response and the text of the Bill of Rights?

4个

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

实验四  HTML Documents with Embedded Objects

16.How many HTTP GET request messages did your browser send?  To which Internet addresses were these GET requests sent?

4个 都是128.119.245.12

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

17. Can you tell whether your browser downloaded the two images serially, or whether they were downloaded from the two web sites in parallel?  Explain.

平行! 实际上,当我们请求嵌入对象时,从Wireshark中我们可以看到浏览器立即发送了第二个请求,而不是直到第一个请求的响应才发送请求。

实验五 HTTP Authentication 

18.What is the server’s response (status code and phrase) in response to the initial HTTP GET message from your browser?

Status Code: 401

Response Phrase: Unauthorized

计算机网络HTTP实验指导 Wireshark Labs: HTTP

 

19. When your browser’s sends the HTTP GET message for the second time, what new field is included in the HTTP GET message?

第二次的请求信息中添加了Authorization项:

Authorization: Basic MTI6MjIy\r\n

    Credentials: 12:222

 

计算机网络HTTP实验指导 Wireshark Labs: HTTP