【问题标题】:Why is there a get http/1.1 packet on a https website?为什么 https 网站上会有 get http/1.1 数据包?
【发布时间】:2020-04-07 19:52:08
【问题描述】:

我在 mozilla 搜索栏输入 amazon.com 并回车,目的是通过wireshark 观察交换的数据包。 但奇怪的是,在 TCP 握手之后有一个 GET HTTP/1.1 数据包。在 HTTP/1.1 获取数据包之后,有一个来自亚马逊服务器的 HTTP/1.1 301 Moved Permanently 数据包。亚马逊肯定在使用 HTTPS。我的问题是为什么会有 GET HTTP/1.1 请求是因为我输入了 amazon.com 而不是https://amazon.com?这是 Firefox 的默认行为吗?

【问题讨论】:

  • 欢迎来到 Stack Overflow!我可能会阅读how to ask,然后编辑这个问题。

标签: http firefox https wireshark


【解决方案1】:

分析数据包后得出结论,google-chrome 和 mozilla 在输入 example.com 时的默认行为是在端口 80 上建立 tcp 连接并向 http://example.com 发送 get 请求,如果网站使用 https 之类的在我的情况下,它将响应状态为 301(永久移动)的 http 响应,其中包括正确的地址(https://example.com)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-21
    • 2019-11-25
    • 2017-07-14
    • 1970-01-01
    • 2015-07-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多