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

Garri Djavadyan garryd at comnet.uz
Wed Nov 30 15:12:29 UTC 2016


On Wed, 2016-11-30 at 07:44 -0700, Alex Rousskov wrote:
> On 11/30/2016 04:44 AM, Garri Djavadyan wrote:
> > 
> > * If-Modified-Since header is ignored if If-None-Match header
> > exists
> > (RFC7232 compliance) 
> 
> > 
> >      if (r.header.has(Http::HdrType::IF_NONE_MATCH)) {
> > +        if (e->hasIfNoneMatchEtag(r)) {
> > +            // RFC 7232: If-None-Match recipient MUST ignore IMS
> >              r.flags.ims = false;
> >              r.ims = -1;
> >              r.imslen = 0;
> >              r.header.delById(Http::HdrType::IF_MODIFIED_SINCE);
> >  
> >              sendNotModifiedOrPreconditionFailedError();
> >              return true;
> >          }
> >  
> > +        // If-None-Match did not match; treat as an unconditional
> > hit
> > +        return false;
> >      }
> 
> 
> Can you explain why we are not clearing various IMS flags and headers
> when hasIfNoneMatchEtag() returns false? Does not RFC7232 compliance
> require equal treatment of IMS in both true and false cases?
> 
> 
> Thank you,
> 
> Alex.

Sorry, Alex you are right. I overlooked it. I've attached fixed
version.


On Thu, 2016-12-01 at 01:20 +1300, Amos Jeffries wrote:
> I would really like the LogTags flag to be an actual flag, but I can
> do that as a followup or later when I convert the others to flags.

Should I revert TCP_INM_HIT to TCP_IMS_HIT at the moment?


Thanks,

Garri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_if-none-match_v4.patch
Type: text/x-patch
Size: 3920 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20161130/a6f22d4a/attachment.bin>


More information about the squid-dev mailing list