大概楼主想要的是这个效果?
➜ ~ curl -D -
v2ex.comHTTP/1.1 301 Moved Permanently
Server: nginx/1.11.6
Date: Sun, 26 Feb 2017 06:02:14 GMT
Content-Type: text/html
Content-Length: 185
Connection: keep-alive
Location:
https://v2ex.com/X-ORCA-Accelerator: from
093.chn.fuo01.cn.krill.c3edge.net<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.11.6</center>
</body>
</html>
➜ ~ curl -iv --raw
https://v2ex.com* Rebuilt URL to:
https://v2ex.com/* Trying 14.152.44.135...
* TCP_NODELAY set
* Connected to
v2ex.com (14.152.44.135) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.v2ex.com
* Server certificate: TrustAsia DV SSL CA - G5
* Server certificate: VeriSign Class 3 Public Primary Certification Authority - G5
> GET / HTTP/1.1
> Host:
v2ex.com> User-Agent: curl/7.51.0
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
HTTP/1.1 301 Moved Permanently
< Server: nginx/1.11.6
Server: nginx/1.11.6
< Date: Sun, 26 Feb 2017 06:02:40 GMT
Date: Sun, 26 Feb 2017 06:02:40 GMT
< Content-Type: text/html
Content-Type: text/html
< Content-Length: 185
Content-Length: 185
< Connection: keep-alive
Connection: keep-alive
< Location:
https://www.v2ex.com/Location:
https://www.v2ex.com/< Strict-Transport-Security: max-age=10886400; includeSubDomains; preload
Strict-Transport-Security: max-age=10886400; includeSubDomains; preload
< X-ORCA-Accelerator: from
093.chn.fuo01.cn.krill.c3edge.netX-ORCA-Accelerator: from
093.chn.fuo01.cn.krill.c3edge.net<
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.11.6</center>
</body>
</html>
* Curl_http_done: called premature == 0
* Connection #0 to host
v2ex.com left intact