printf qq/ETag: "%x-%x-%x"

/, (stat $filename)[1, 7, 9];

FileETag None

FileETag Size MTime

FileETag -INode

% telnet s.hatena.ne.jp 80 Trying 59.106.108.97... Connected to s.hatena.ne.jp. Escape character is '^]'. HEAD /js/HatenaStar.js HTTP/1.1 Host: s.hatena.ne.jp Cookie: b=hoge Connection: close HTTP/1.1 200 OK Date: Thu, 27 Nov 2008 00:53:51 GMT Server: Apache Last-Modified: Tue, 04 Nov 2008 09:25:37 GMT ETag: "b88995-1697f-45ad9a572a640" Accept-Ranges: bytes Content-Length: 92543 Vary: Accept-Encoding Connection: close Content-Type: application/x-javascript Connection closed by foreign host.

* ちなみに、b=hoge とかいう Cookie を送っているのは、session cookie をリクエストの都度吐いてくるので、迷惑にならないように「既に session cookie 持ってるよ」と欺いてます

% telnet s.hatena.ne.jp 80 Trying 59.106.108.97... Connected to s.hatena.ne.jp. Escape character is '^]'. HEAD /js/HatenaStar.js HTTP/1.1 Host: s.hatena.ne.jp Connection: close Cookie: b=hoge If-Modified-Since: Tue, 04 Nov 2008 09:25:37 GMT If-None-Match: "b88995-1697f-45ad9a572a640" HTTP/1.1 200 OK Date: Thu, 27 Nov 2008 00:54:48 GMT Server: Apache Last-Modified: Tue, 04 Nov 2008 09:20:37 GMT ETag: "f9665-1697f-45ad993910340" Accept-Ranges: bytes Content-Length: 92543 Vary: Accept-Encoding Connection: close Content-Type: application/x-javascript Connection closed by foreign host.

Last-Modified: Tue, 04 Nov 2008 09:25:37 GMT ETag: "b88995-1697f-45ad9a572a640"

Last-Modified: Tue, 04 Nov 2008 09:20:37 GMT ETag: "f9665-1697f-45ad993910340"

Last-Modified: Tue, 13 May 2008 13:04:52 GMT ETag: "f8ff2-362-44d1c4f516500"

Last-Modified: Tue, 13 May 2008 13:04:53 GMT ETag: "b88361-362-44d1c4f60a740"

Last-Modified: Tue, 13 May 2008 13:04:52 GMT ETag: "f8fe8-51-44d1c4f516500"

Last-Modified: Tue, 13 May 2008 13:04:53 GMT ETag: "b88357-51-44d1c4f60a740"

Last-Modified: Tue, 13 May 2008 13:04:52 GMT ETag: "f9044-b2-44d1c4f516500"

Last-Modified: Tue, 13 May 2008 13:04:53 GMT ETag: "b883b3-b2-44d1c4f60a740"