LAB 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?

    HTTP 1.1

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

    中文,q = 0.6~0.9 的 en 版本

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

    IP Host: 10.255.91.78

    IP Server: 128.119.245.12

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

    200 OK

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

    Thu, 27 Oct 2022 05:59:01 GMT

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

    128B

  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

The HTTP CONDITIONAL GET/response interaction

Web 缓存机制

  1. 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?

    没有

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

    是的,我们可以直接看到 text/html 内的内容
    在这里插入图片描述

  3. 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?

    看到了

    在这里插入图片描述

  4. 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.

    304 Not Modified

    没有显式地返回文件内容!

    在这里插入图片描述

    文件随着 HTTP 返回报文发回给 B, 但是文件的内容并没有被显式的表现出来

    书中是这么解释的,B & web 缓存器建立 TCP 连接, C 向 Web 缓存 发送 http 请求报文

    若有副本,Web 缓存用 http 响应报文返回给 B

    若没有副本(当然被修改过的话也就是没有副本啦)web 缓存向 初始服务器 建立 TCP 连接。通过 http 请求& 响应报文获取对象并存储副本,再用 HTTP 响应报文回给 B。但对于显式返回文件内容没有解释 😢

    以下是 Love 6 老哥的解答,也会是解决了我的一大疑惑

    (6条消息) 《计算机网络自顶向下》Wireshark实验 Lab2 HTTP_Love 6的博客-CSDN博客

    Q&A 2

    没有退回文件内容 因为浏览器已经把内容缓存了 即浏览器直接把信息返回给我们了 服务器检测文件更改信息是否比我们的缓存时间之后 如果是在其后面则返回一个现在更改过后的 不然即返回 304 Not Modified

Retrieving Long Documents

长文件 HTTP Response 报文

  1. 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?

    1 个

    在这里插入图片描述

    1052 ,在这里我把 packet number 理解成发送 ws 嗅探到的帧的序列号,确实不知道是什么东西😢

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

    frame 1111

    200 & OK

    在这里插入图片描述

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

    仅有一个

  4. 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

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

    在这里插入图片描述

    4 个

    获取 html 文件

    获取 png 图片

    获取 jpg 图片

    获取一个不知道什么东西,可能是控制报文
    在这里插入图片描述

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

    后者,显然图片发布在两个不同的网站上,C 发出了两个不同地址的 GET 请求给两个不同的网站以获取图片

HTTP Authentication

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

    401 Unauthorized 未认证的

    在这里插入图片描述

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

    第一个 GET 报文

    在这里插入图片描述

    第二个报文

在这里插入图片描述

Cache-Control & Authorization 两个字段
在这里插入图片描述

这个密码在 HTTP上是明文发送的😱

While it may appear that your username and password are encrypted, they are simply encoded in a format known as Base64 format! 仅仅是换了个格式发送而已

Fear not! As we will see in Chapter 8, there are ways to make WWW access more secure. However, we’ll clearly need something that goes beyond the basic HTTP authentication framework

后记

MD 转 CSDN 图片格式转化是真的麻烦 …

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值