• curl查看请求是走http还https


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

      

      

  • 相关阅读:
    arthas常用命令记录
    idea 的 http-client
    springboot 接口层参数校验 自定义参数校验
    Spring AOP 实现——使用annotation、pointcut、aspect
    Redis 热点名词
    SpringCloud注册发现配置
    【设计模式】-行为型-11-解释器模式
    【设计模式】-行为型-10-备忘录模式
    【设计模式】-创建型-9-访问者模式
    Kubernetes运行原理
  • 原文地址:https://www.cnblogs.com/lucktomato/p/16757023.html
Copyright © 2020-2023  润新知