HTTP协议常用的无非就那么几个命令
GET
HEAD
PUT
POST
此处简单说下http的GET和HEAD
举两个简单的例子:
GET的例子
telnet serverip 80
GET http://www.aaa.com/aaa.html //输入get命令和get的url
HTTP/1.0 200 OK
Date: Thu, 24 Apr 2014 01:19:11 GMT
X-Powered-By: ASP.NET yltv
X-AspNet-Version: 2.0.50727
Content-Type: text/html; charset=gb2312
Content-Length: 28309
X-Cache: HIT from cache121.aaa.com
Connection: close
<h1>john_test page!!!</h1>
失去了跟主机的连接。
HEAD的例子 查看响应的HTTP头信息在win下可代替CURL 命令的-I参数
telnet serverip 80
GET http://www.aaa.com/aaa.html //输入get命令和get的url
HTTP/1.0 200 OK
Date: Thu, 24 Apr 2014 01:19:11 GMT
X-Powered-By: ASP.NET yltv
X-AspNet-Version: 2.0.50727
Content-Type: text/html; charset=gb2312
Content-Length: 28309
X-Cache: HIT from cache121.aaa.com
Connection: close
失去了跟主机的连接。
就像squid有个清缓存的http指令,PUGRE
如果项清除某个页面的缓存就可以telnet到此squid服务器的80端口
然后执行PUGRE http://host/url 这样就可以pugre缓存了
但前提是squid的acl允许!
原来HTTP协议就是如此的简单!!!
##########################################
迷途小运维随笔
作者:john
转载请注明出处