--------------------- PatchSet 2440 Date: 2001/06/01 08:55:19 Author: hno Branch: etag Tag: (none) Log: Handle variance without entity tags Members: src/store.c:1.12.14.13->1.12.14.14 Index: squid/src/store.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store.c,v retrieving revision 1.12.14.13 retrieving revision 1.12.14.14 diff -u -r1.12.14.13 -r1.12.14.14 --- squid/src/store.c 31 May 2001 00:49:04 -0000 1.12.14.13 +++ squid/src/store.c 1 Jun 2001 08:55:19 -0000 1.12.14.14 @@ -1,6 +1,6 @@ /* - * $Id: store.c,v 1.12.14.13 2001/05/31 00:49:04 hno Exp $ + * $Id: store.c,v 1.12.14.14 2001/06/01 08:55:19 hno Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -523,15 +523,15 @@ state->current.etag = xmalloc(l2+1); memcpy(state->current.etag, p2, l2); state->current.etag[l2] = '\0'; - if (strcmp(state->current.etag, state->etag) == 0) { + if (state->etag && strcmp(state->current.etag, state->etag) == 0) { if (!state->key) { state->current.this_key = 1; } else { const cache_key *oldkey = storeKeyScan(state->current.key); if (strmatch(p2, state->key, l) != 0) { StoreEntry *old_e = storeGet(oldkey); - if (old_e) - storeRelease(old_e); + if (old_e) + storeRelease(old_e); safe_free(state->current.key); state->current.key = xstrdup(state->key); state->current.this_key = 1; @@ -587,7 +587,8 @@ if (key) state->key = xstrdup(storeKeyText(key)); state->vary_headers = xstrdup(vary_headers); - state->etag = xstrdup(etag); + if (etag) + state->etag = xstrdup(etag); state->oe = storeGetPublic(url, method); debug(11, 1) ("storeAddVary: %s (%s) %s %s\n", state->url, state->key, state->vary_headers, state->etag);