Gemmy wrote:
> I have a question about the "Date" in response header.
> As I know, the "Date" should be the just time when the server response
> the request. But If I request through squid2.6 as a cache server, I get
> the right "Date" only the first time! Squid return the same
> "Date"/"Expires"...after the second request.
> I guess that squid might return the headers exist in the cache file. I
> strings one file and see text as follows:
> http://tech.china.com/zh_cn/mobile/market/11025044/20080102/images/2008010209212895055100.jpg
> HTTP/1.1 200 OK
> Server: nginx/0.7.62
> Date: Fri, 03 Sep 2010 12:40:54 GMT
> Content-Type: image/jpeg
> Content-Length: 47072
> Last-Modified: Wed, 02 Jan 2008 01:15:06 GMT
> Connection: keep-alive
> Expires: Fri, 03 Sep 2010 13:10:54 GMT
> Cache-Control: max-age=1800
> Accept-Ranges: bytes
>
> But when I test a url through a CDN's cache, I see the "Date" changes
> every test.
> wget -S http://images7.moonbasa.com/ProductImg/Middle/WX10010090M01.jpg
> -O /dev/null
> --22:00:09-- http://images7.moonbasa.com/ProductImg/Middle/WX10010090M01.jpg
> Resolving images7.moonbasa.com... 123.183.210.173
> Connecting to images7.moonbasa.com|123.183.210.173|:80... connected.
> HTTP request sent, awaiting response...
> HTTP/1.1 200 OK
> Server: DnionOS/1.0
> Date: Fri, 03 Sep 2010 14:00:22 GMT
> Content-Type: image/jpeg
> Connection: keep-alive
> Cache-Control: max-age=31104000
> Content-Length: 13726
> Last-Modified: Mon, 23 Aug 2010 09:06:04 GMT
> Accept-Ranges: bytes
> ETag: "2074f569a242cb1:1b20"
> Vary: Accept-Encoding
> X-Powered-By: ASP.NET
> X-Cache: MISS from CT-SHBA-177-211.fastcdn.com
> Age: 12119
> X-Cache: HIT from CT-QHD-210-146.fastcdn.com
> Length: 13726 (13K) [image/jpeg]
> Is there anything wrong?
>
Other than their omitting Via: header. Not really.
One of the privileges of being a CDN / reverse-proxy is being an
authoritive source for the data. Which means the Date is allowed to be
set at the time they leave the CDN.
It's also possible the CDN is re-validating on every request and sending
you the revised Date from the origin server. Squid tries hard to avoid this.
Amos
-- Please be using Current Stable Squid 2.7.STABLE9 or 3.1.7 Beta testers wanted for 3.2.0.1Received on Fri Sep 03 2010 - 15:18:22 MDT
This archive was generated by hypermail 2.2.0 : Fri Sep 03 2010 - 12:00:04 MDT