[squid-dev] [PATCH] Must revalidate CC:no-cache responses

Amos Jeffries squid3 at treenet.co.nz
Tue Sep 6 10:53:08 UTC 2016


On 6/09/2016 10:01 a.m., Eduard Bagdasaryan wrote:
> 
> MUST always revalidate Cache-Control:no-cache responses.
> 
> Squid MUST NOT use a CC:no-cache response for satisfying subsequent
> requests without successful validation with the origin server. Squid
> violated this MUST because Squid mapped both "no-cache" and
> "must-revalidate"/etc. directives to the same ENTRY_REVALIDATE flag
> which was interpreted as "revalidate when the cached response becomes
> stale" rather than "revalidate on every request".
> 
> This patch splits ENTRY_REVALIDATE into:
> - ENTRY_REVALIDATE_ALWAYS, for entries with CC:no-cache and
> - ENTRY_REVALIDATE_STALE, for entries with other related CC directives
>   like CC:must-revalidate and CC:proxy-revalidate.
> 
> Reusing ENTRY_CACHABLE_RESERVED_FOR_FUTURE_USE value for the more
> forgiving ENTRY_REVALIDATE_STALE (instead of the more aggressive
> ENTRY_REVALIDATE_ALWAYS) fixes the bug for the already cached entries -
> they will be revalidated and stored with the correct flag on the next
> request.

Applied to trunk as rev.14820

Amos



More information about the squid-dev mailing list