例如:telnet localhost 8080,然后就可以看到返回的相应。
HEAD /huhu.html HTTP/1.1 Host:www.baidu.com
HEAD /huhu.html HTTP/1.0 Host:www.baidu.com
当然我们使用http/1.1,还可以设置连接状态,比如:
HEAD / HTTP/1.1 Host:www.baidu.com Connection:Keep-Alive
HEAD / HTTP/1.1 Host:www.baidu.com Connection:Close
原文地址:http://blog.csdn.net/u011794238/article/details/46419805