[squid-dev] Fix If-None-Match processing and related bug 4169

Amos Jeffries squid3 at treenet.co.nz
Mon Dec 5 03:57:03 UTC 2016


On 5/12/2016 4:05 p.m., Alex Rousskov wrote:
> On 11/30/2016 08:12 AM, Garri Djavadyan wrote:
> 
>> I've attached fixed version.
> 
>> +        // If-None-Match did not match; treat as an unconditional hit
>> +        return false;
> 
> Actually, in this case, If-None-Match matched (i.e., "no one matched" is
> true). And this is exactly why we can ignore that conditional header
> field and treat the request as an unconditional hit. All these
> conditional headers have the same overall logic: If the answer to the
> "If" question asked by the header field name is "yes", then the header
> field is essentially ignored.
> 

FWIW; I find it easier to process thee headers logic in human terms by
prefixing "send a 200" to the conditionals, which are in turn joined
with "AND".

So this case is "send a 200 if none match" :-)


> How about:
> 
>   // None-Match is true (no one matched); treat as an unconditional hit

I think s/no one/no Etag/ to be clearer on what 'one' is going on about.


Amos



More information about the squid-dev mailing list