The Basic HTTP GET/response interaction
-
Is your browser running HTTP version 1.0 or 1.1? What version of HTTP is the server running? HTTP 1.1 -
What languages (if any) does your browser indicate that it can accept to the server? 中文,q = 0.6~0.9 的 en 版本 -
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 -
What is the status code returned from the server to your browser? 200 OK -
When was the HTML file that you are retrieving last modified at the server? Thu, 27 Oct 2022 05:59:01 GMT -
How many bytes of content are being returned to your browser? 128B -
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 缓存机制
-
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? 没有 -
Inspect the contents of the server response. Did the server explicitly return the contents of the file? How can you tell? 是的,我们可以直接看到 text/html 内的内容 -
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? 看到了 -
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 报文
-
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 嗅探到的帧的序列号,确实不知道是什么东西😢 -
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 -
What is the status code and phrase in the response? 仅有一个 -
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
-
How many HTTP GET request messages did your browser send? To which Internet addresses were these GET requests sent? 4 个 获取 html 文件 获取 png 图片 获取 jpg 图片 获取一个不知道什么东西,可能是控制报文 -
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
-
What is the server’s response (status code and phrase) in response to the initial HTTP GET message from your browser? 401 Unauthorized 未认证的 -
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 图片格式转化是真的麻烦 …
|