C:UsersSelboo>curl -I http://www.aikaiyuan.com
HTTP/1.0 200 OK
Server: Tengine/1.4.2
Date: Wed, 28 Nov 2012 07:53:23 GMT
Content-Type: text/html; charset=UTF-8
Vary: Accept-Encoding
X-Pingback: http://www.aikaiyuan.com/xmlrpc.php
X-Cache: MISS from Selboo-Cache-001
Connection: keep-alive
[root@Selboo squid-3.1.21]# vi src/HttpHeader.cc
139 {“X-Cache”, HDR_X_CACHE, ftStr},
140 {“X-Cache-Lookup”, HDR_X_CACHE_LOOKUP, ftStr},
修改为
139 {“By-SelBoo-Cache”, HDR_X_CACHE, ftStr},
140 {“By-Selboo-Cache-Lookup”, HDR_X_CACHE_LOOKUP, ftStr},
重新编译
C:UsersSelboo>curl -I http://www.aikaiyuan.com
HTTP/1.0 200 OK
Server: Tengine/1.4.2
Date: Wed, 28 Nov 2012 07:53:23 GMT
Content-Type: text/html; charset=UTF-8
Vary: Accept-Encoding
X-Pingback: http://www.aikaiyuan.com/xmlrpc.php
By-SelBoo-Cache: MISS from Selboo-Cache-001
Connection: keep-alive
转载请注明:爱开源 » Squid 修改 Head头 X-Cache