IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 网络协议 -> LAB HTTP -> 正文阅读

[网络协议]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 图片格式转化是真的麻烦 …

  网络协议 最新文章
使用Easyswoole 搭建简单的Websoket服务
常见的数据通信方式有哪些?
Openssl 1024bit RSA算法---公私钥获取和处
HTTPS协议的密钥交换流程
《小白WEB安全入门》03. 漏洞篇
HttpRunner4.x 安装与使用
2021-07-04
手写RPC学习笔记
K8S高可用版本部署
mySQL计算IP地址范围
上一篇文章      下一篇文章      查看所有文章
加:2022-10-31 12:34:57  更:2022-10-31 12:35:44 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年5日历 -2024/5/19 10:19:15-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码