baidu.com跳转www.baidu.com

打开git bash,输入 curl baidu.com,收到返回

<html>
<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">
</html>

把代码新建文件运行,发现是一个重定向的功能。

如果,curl www.baidu.com 的代码呢?

是这样的:

$ curl -v www.baidu.com 可以看到请求的报文的信息

原文地址:https://www.cnblogs.com/ww01/p/9790869.html