什么标题自动发送wget?

我知道你可以用--header选项手动设置一些头文件,但是我想知道它发送了什么头文件而没有交互。

使用-d选项,我看到它设置:

 ---request begin--- GET / HTTP/1.0 User-Agent: Wget/1.12 (cygwin) Accept: */* Host: www.uml.edu Connection: Keep-Alive ---request end--- 

这很容易检查:编写一个脚本,显示您的Web服务器发送标题或转储标题。

用PHP你需要print_r(getallheaders());

 Array ( [User-Agent] => Wget/1.11.4 [Accept] => */* [Host] => localhost [Connection] => Keep-Alive ) 

testingGNU Wget 1.11.4。