2008年5月5日星期一

header信息不一致

遇到一个trouble
一个css 访问的过程是squid ->apache(deflate)
直接访问apache是可以得到正确的header

HTTP/1.1 200 OK
Date: Mon, 05 May 2008 07:32:32 GMT
Server: Apache
Last-Modified: Thu, 27 Mar 2008 02:32:28 GMT
ETag: "278c15c-19da-ff234700"
Accept-Ranges: bytes
Cache-Control: max-age=5184000
Expires: Fri, 04 Jul 2008 07:32:32 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 1834
Connection: close
Content-Type: text/css


而经过了squid 后,时而好,时而不好
下面是不好

Date: Mon, 05 May 2008 07:30:29 GMT
Server: Apache
Content-Type: text/plain; charset=UTF-8
Last-Modified: Thu, 27 Mar 2008 02:32:28 GMT
ETag: "278c15c-19da-ff234700"
Accept-Ranges: bytes
Content-Length: 6618
Cache-Control: max-age=5184000
Expires: Fri, 04 Jul 2008 07:29:29 GMT
Age: 60
***-Cache: MISS from nj-1.***.com
***-Cache-Lookup: MISS from nj-1.***.com:80
Via: 1.0 nj-1.***.com:80 (*** Cache)


过squid好的情况

HTTP/1.0 200 OK
Date: Mon, 05 May 2008 07:33:40 GMT
Server: Apache
Last-Modified: Thu, 27 Mar 2008 02:32:28 GMT
ETag: "278c15c-19da-ff234700"
Accept-Ranges: bytes
Cache-Control: max-age=5184000
Expires: Fri, 04 Jul 2008 07:33:40 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 1834
Content-Type: text/css
***-Cache: MISS from nj-1.***.com
***-Cache-Lookup: MISS from nj-1.***.com:80
Via: 1.0 nj-1.***.com:80 (*** Cache)
Connection: close


已知的情况
1.url带问号,如:

www/style/layout1.css?v=20080327_v1.css

2.apache已设置mod_deflate,和 mod_mem_cache,apache的addtype是正确的

CacheEnable mem /
MCacheSize 10240
McacheMaxObjectCount 5000


猜测原因1,mod_mem_cache的问题,squid设置的问题
需要进一步关注:)

没有评论: