[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ETag & Content-Encoding




In IIS 7, different ETags are received:

HEAD /__utm.js HTTP/1.1
User-Agent: Fiddler
Host: www.iis.net

HTTP/1.1 200 OK
Content-Length: 16867
Content-Type: application/x-javascript
Last-Modified: Tue, 24 Apr 2007 20:25:07 GMT
Accept-Ranges: bytes
ETag: "cb9314a6ae86c71:0"
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
Date: Sun, 30 Sep 2007 09:32:45 GMT

HEAD /__utm.js HTTP/1.1
User-Agent: Fiddler
Host: www.iis.net
Accept-Encoding: gzip

HTTP/1.1 200 OK
Content-Length: 4978
Content-Type: application/x-javascript
Content-Encoding: gzip
Last-Modified: Tue, 24 Apr 2007 20:25:05 GMT
Accept-Ranges: bytes
ETag: "80a6c2a4ae86c71:0"
Vary: Accept-Encoding
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
Date: Sun, 30 Sep 2007 09:33:41 GMT

In Section 3.11 of RFC 2616:

  An entity tag MUST be unique across all versions of all entities
  associated with a particular resource. A given entity tag value MAY
  be used for entities obtained by requests on different URIs. The use
  of the same entity tag value in conjunction with entities obtained by
  requests on different URIs does not imply the equivalence of those
  entities.

Is the gzip-ed content a different version of the original content?

-Franklin

--------------------------------------------------
From: "Sam Ruby" <rubys@xxxxxxxxxxxxxxxx>
Date: Sunday, 30 September, 2007 17:07
To: "Julian Reschke" <julian.reschke@xxxxxx>
Cc: "Franklin Tse" <peaceable_whale@xxxxxxxxxxx>; "atom-protocol" <atom-protocol@xxxxxxx>
Subject: Re: ETag & Content-Encoding

Julian Reschke wrote:

Franklin Tse wrote:

Hi all,

I have a question about the Entity Tag (ETag) and the Content-Encoding.

Should ETag be different when the content is transferred with different Content-Encoding?

Yes.

That doesn't appear to be the way that Apache behaves with static content.

$ curl -s --head http://www.intertwingly.net/favicon.ico| grep ETag
ETag: "7809f-13e-bd7ebd80"

$ curl -s -H Accept-encoding:gzip,compress --head http://www.intertwingly.net/favicon.ico| grep ETag
ETag: "7809f-13e-bd7ebd80"

- Sam Ruby