[squid-dev] Fix If-None-Match processing and related bug 4169
Alex Rousskov
rousskov at measurement-factory.com
Wed Nov 30 14:44:34 UTC 2016
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.
More information about the squid-dev
mailing list