On 29/08/2008, at 2:13 PM, Alex Rousskov wrote:


On Thu, 2008-08-28 at 15:16 +1000, Benno Rice wrote:
RFC-compliant object invalidation behaviour.

- Switch the default from not purging if the method is unknown to purging if
 the method is unknown.

- return false; // be conservative: we do not know some methods specs
+  return true; // RFC says to purge if we don't know the method

Perhaps add that the RFC says SHOULD purge and refer to Section 13.10?
This requirement will probably surprise a few developers so it is better
to be explicit.

Already done, as per Amos' request earlier in the thread.

Also, if you change the default to return true, then we can delete all
"return true" cases in the same  HttpRequestMethod::purgesOthers()
method. This will make the method a tiny bit faster.

That's true, although the gain will probably be minor as it would (I hope) be optimised that way. It may also be worth leaving this layout in case it's desired to make this behaviour conditional.

- When purging URIs sourced from Location and Content-Location headers, make sure the URL is absolute before a) comparing it to see if hosts match and b)
 actually trying to find it in the store.

These changes are based on changes made to squid 2. In particular, the urlAbsolute function was ported from squid 2. I would appreciate it if people paid particular attention to urlAbsolute to make sure I'm not doing anything
that would cause problems in squid 3.

urlAbsolute() is not yet documented in the patch. Please add a few
comments to explain what it does and why we cannot use some of the
existing URL formatting routines [and then check their output] to arrive
at the answer.


Can do. The idea is to form an absolute URL based on a provided relative URL and an exisiting record, eg a relative URL contained in the Content-Location header of a request. If you know of a function that can do that, or if you can suggest a better way of doing this please let me know. Otherwise I'll tidy the existing function up somewhat and add some comments describing its purpose.

--
Benno Rice
[EMAIL PROTECTED]



Reply via email to