If a response has a ‘Vary’ header and several variants are stored for a given
URL, HTCP CLR and the PURGE method will not remove all variants.

Wrong result.

How it is diagnosed:

We did not reproduce the failure, only analyzed the source code and the discussion threads.

Root Cause:

Squid forgot handle the Vary header in ‘storeClientReadHeader’ (where all the headers were handled by a switch-case statements).

--- squid-2.6.9/src/store_client.c        2006-06-05 22:47:01.000000000 +0000

+++ squid-2.6.9-clrvary/src/store_client.c        2007-02-07 17:15:52.000000000 +0000

@@ -446,6 +446,9 @@ storeClientReadHeader

              switch (t->type) {

                mem->vary_headers = xstrdup(t->value);



  /* The patch: add the handling of VARY header. In the buggy version, this switch stmt fell through to default. */

+        case STORE_META_VARY_ID:

+            memcpy(&mem->vary_id, t->value, sizeof(vary_id_t));

+            break;


  /* There is a log statement but it is of verbosity level 2 --- not enabled by default (only level 0 and 1 are enabled). */

            debug(20, 2) ("WARNING: got unused STORE_META type %d\n", t->type);



Is there any default level message?:

No. There is one in ‘default’ case above, but not printed in default verbosity mode (1)!

Can developer/Errlog add an error msg?

Yes! This is the “Default-switch” pattern!