[squid-dev] [PATCH] Revalidate without Last-Modified

Amos Jeffries squid3 at treenet.co.nz
Sat Aug 27 14:33:33 UTC 2016


On 27/08/2016 11:22 p.m., Eduard Bagdasaryan wrote:
> 2016-08-25 18:52 GMT+03:00 Alex Rousskov:
> 
>> 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?
> 
> I have not found what is the "conditional/revalidation" request from
> HTCP point
> of view. 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.

If the response Squid would emit to the client proxy would contain a
synthesized Last-Modified header - then the same synthetic value should
be sent in HTCP.

I think Squid should be emitting a synthetic L-M header. So yes to
effective modification time being sent (in both HTCP and HTTP responses).

Amos



More information about the squid-dev mailing list