curl查看请求是走http还https

下面是http请求过程

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
curl -v http://www.boyblue.xyz
* About to connect() to www.boyblue.xyz port 80 (#0)
*   Trying 192.168.1.28...
* Connected to www.boyblue.xyz (192.168.1.28) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: www.boyblue.xyz
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx/1.20.0
< Date: Thu, 30 Jun 2022 09:30:29 GMT
< Content-Type: text/html
< Content-Length: 15
< Last-Modified: Wed, 29 Jun 2022 08:01:13 GMT
< Connection: keep-alive
< ETag: "62bc06c9-f"
< Accept-Ranges: bytes
<
Hello,World...
* Connection #0 to host www.boyblue.xyz left intact

下面是https请求过程

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
curl -v https://www.boyblue.xyz
* About to connect() to www.boyblue.xyz port 443 (#0)
*   Trying 192.168.1.28...
* Connected to www.boyblue.xyz (192.168.1.28) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
*       subject: CN=www.boyblue.xyz
*       start date: May 11 00:00:00 2022 GMT
*       expire date: May 11 23:59:59 2023 GMT
*       common name: www.boyblue.xyz
*       issuer: CN=TrustAsia RSA DV TLS CA G2,O="TrustAsia Technologies, Inc.",C=CN
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: www.boyblue.xyz
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx/1.20.0
< Date: Thu, 30 Jun 2022 09:30:09 GMT
< Content-Type: text/html
< Content-Length: 15
< Last-Modified: Wed, 29 Jun 2022 08:01:13 GMT
< Connection: keep-alive
< ETag: "62bc06c9-f"
< Accept-Ranges: bytes
<
Hello,World...
* Connection #0 to host www.boyblue.xyz left intact
 
可以看到HTTPS多了SSL这部分内容

  

  

posted @   lucky_tomato  阅读(151)  评论(0编辑  收藏  举报
编辑推荐:
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 写一个简单的SQL生成工具
· AI 智能体引爆开源社区「GitHub 热点速览」
· C#/.NET/.NET Core技术前沿周刊 | 第 29 期(2025年3.1-3.9)
点击右上角即可分享
微信分享提示