计算机网络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

 

version of HTTP is the server running1.1

 

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

Accept - Language:zh-CN\r\n

 

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

 

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

状态码:200

 

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

 

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

Capture Length: 552 bytes (4416 bits)

 

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

 

 

 

实验二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?

第一次没有出现

 

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

 

 

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

 

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 的页面是最新的,于是客户端就可以直接从本地加载页面了,这样在网络上传输的数据就会大大减少,同时也减轻了服务器的负担。)

 

 

实验三 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

 

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

 

 

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

4个

 

实验四  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

 

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

 

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

 

  • 6
    点赞
  • 43
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值