[Webkit-unassigned] [Bug 24656] cacheControlContainsNoCache() in ResourceResponseBase.h is wrong

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 29 06:03:58 PDT 2009


ap at webkit.org changed:

           What    |Removed                     |Added
                 CC|                            |ddkilzer at webkit.org

------- Comment #6 from ap at webkit.org  2009-03-29 06:03 PDT -------
OK, I guess it's a bit unfair to strictly require tests, given that we've let
the original patch in with no tests at all. But it also means that the tests
are so much more important!

>          if ((equalIgnoringCase(directives[i].first, "private") || equalIgnoringCase(directives[i].first, "no-cache")) && !directives[i].second.isEmpty())
>              parseCacheControlDirectiveValues(directives[i].second, directiveValues);
>          else
> -            directiveValues.append(directives[i].second);
> +            directiveValues.append(directives[i].first);

This code looks busted in many more ways, and I don't think that it's very
desirable to only fix one minor case. All this check does is stuff
Cache-Control private and no-cache directive values into one bucket with other
directives, which looks bogus. E.g., one possible use of this syntax is
'Cache-Control: no-cache="X-Foobar"', which means that 'X-Foobar' header must
not be sent in a proxy response without revalidation.

According to svn blame, this code was added in

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list