Hi, We've been testing our ETags and discovered interesting behaviour... Let's say there is a STALE entry with a Last-Modified header. A client issues unconditional GET for the entry. Squid has to validate the entry, so it sends to the server the client's request with some additional headers (most importantly If-Modified-Since)... This goes via processExpired() function (I'm almost sure)...
Suppose, that in response to this conditional request server sends 200 OK with new Last-Modified, and new response body. Squid reads the headers, and in handleIMSReply() decides whether the client should get old or new entry (function clientGetsOldEntry)... clientGetsOldEntry acknowledges 200 OK status and returns false (meaning that client should get new entry) Up until now everything is ok, but... The processMiss() is called and it repeats the !same! conditional request the server has already responded to. My question is (as usual ;): is it correct? I mean that if server repeats its response (why shouldn't it?), everything is ok... squid proccesses the second reply differently (I think, We couldn't find out why, and where) and it returns it to the client... Everything is ok, besides that unnecessary net traffic is generated. So, if it should work like this, we would be grateful if you told us the reason. And, by what means does squid recognizes that the second reply should not cause another request to the server? regards, Mati.
