首页 > 其他分享 >curl查看请求是走http还https

curl查看请求是走http还https

时间:2022-10-06 09:35:39浏览次数:44  
标签:www http 2022 xyz https curl boyblue GMT

下面是http请求过程

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请求过程

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这部分内容

  

  

标签:www,http,2022,xyz,https,curl,boyblue,GMT
From: https://www.cnblogs.com/lucktomato/p/16757023.html

相关文章

  • git提交报错:fatal: unable to access 'https://github.com/xxxx.git/': OpenSSL SSL_r
    一/现象  二/原因 因为git在拉取或者提交项目时,中间会有git的http和https代理,但是我们本地环境本身就有SSL协议了,所以取消git的https代理即可,不行再取消http的代......
  • nginx fastcgi模块ngx_http_fastcgi_module详细解析、使用手册、完整翻译
    ​​ngx_http_fastcgi_module​​ 模块允许将请求传递给FastCGI服务器。 示例配置location/{fastcgi_passlocalhost:9000;fastcgi_indexindex.php;fas......
  • C++之libcurl环境配置安装
    目录C++之libcurl环境配置安装前言curl与libcurl的区别InstalllibcurlonLinuxInstalllibcurlonWindows源码例子其他的网络库C++之libcurl环境配置安装前言最近在......
  • http 500 错误
    214[ThuSep0916:03:54.9193342021][:error][pid32045][client124.238.184.230:23796]script'/var/www/html/test.php'notfoundorunabletostat215[ThuS......
  • HTTP常见状态码
    1、HTTP200状态码HTTP200状态码代表的意思是:请求成功,即HTTP200OK响应状态。状态详细说明:HTTP200表示http请求成功。即正常的成功访问时响应的状态码。2、HTTP......
  • 安装Docker容器时,出现https://yum.dockerproject.org/repo/main/centos/7/repodata/re
    解决办法:首先确定把相应的前置包都安装好,之后操作命令行:执行yum-config-manager--disabledockerrepo命令然后再执行:sudo yum installdocker-cedocker-ce-clicont......
  • nginx&http 第三章 ngx http 框架处理流程
    1.nginx 连接结构 ngx_connection_t 这个连接表示是客户端主动发起的、Nginx服务器被动接受的TCP连接,我们可以简单称其为被动连接。同时,在有些请求的处理过程中,Nginx会试......
  • http协议
    简介超文本传输协议(英文:HyperTextTransferProtocol,缩写:HTTP)是一种用于分布式、协作式和超媒体信息系统的应用层协议。HTTP是万维网的数据通信的基础概述HTTP是一个客......
  • 彻底搞懂 Http 缓存策略,切记死背概念! 错误点
    https://juejin.cn/post/6907592506779631623 又查了查,似乎是chromium版本更新,把一些策略改了,这里写的一些是老版本的情况 起码在chrome上,有很多地方不对......
  • 讲讲http缓存机制。
    缓存分析:浏览器向服务器发起http请求,服务器响应该请求,在浏览器拿到服务器返回会的数据后,会根据响应报文的http头的缓存标识,决定结果是否缓存,,是则将结果和缓存标识......