On 08/27/2016 05:22 AM, Eduard Bagdasaryan wrote: > 2016-08-25 18:52 GMT+03:00 Alex Rousskov > <[email protected]>: > >> 3. Sending an HTCP message to another service. >> >> > - hdr.putTime(Http::HdrType::LAST_MODIFIED, e->lastmod); >> > + if (e && e->lastModified() > -1) >> > + hdr.putTime(Http::HdrType::LAST_MODIFIED, > e->lastModified());
>> Is this a conditional/revalidation request? If yes, then should we use >> an effective modification time instead, like we do in use case #1? > The code snippet is taken from htcpTstReply(), serving replies for TST > requests (TST - test for the presence in the cache). If the entry is cached, > this method fills HTCP reply packet with some of cached entry's headers (Age, > Expires, Last-Modified etc.). According to the documentation, these headers > are > added in order to give client an ability to calculate object's freshness > itself: > HTCP response does not provide such information explicitly. On the other > hand, I > have not found any strict requirements of what HTTP headers HTCP reply should > contain. > > Would the "effective" Last-Modified information help HTCP client to > calculate object's freshness? It looks that some more information in this > case is > better that lack of it. Good question. I worry about the message recipient comparing received effective LMT with the actual (absent!) LMT of the object they have in the cache and then deciding that the resource has changed (and their cached copy is now stale) because the resource now has LMT and it did not have it before. Not all HTCP clients are Squids, but how does Squid code treat such an HTCP TST response? In other words, will Squid itself make a different decision if it receives an effective LMT header value instead of no LMT header field at all? Does your own patch affect the receiving Squid behavior? Thank you, Alex. _______________________________________________ squid-dev mailing list [email protected] http://lists.squid-cache.org/listinfo/squid-dev
