request->flag.hierarchical flag. If the flag is not set, then
we should not use cache digests to select a neighbor.
Normally this was not a problem because non-hierarchical
requests are usually also non-cachable, and digests only
include cachable objects. However, it seems that we sometimes
get false hits from the digest for non-hierarchical objects,
specifically a POST request.
If the POST goes to a sibling, we'll add only-if-cached. Of course
the POST response should not be cached, so the response is 504
Gateway Timeout. The originating cache can not re-forward the
request because it was a POST (well, maybe it could, but thats
a slippery slope). The user gets the ugly cache-miss and
only-if-cached error message.
/*
- * $Id: neighbors.cc,v 1.273 1999/05/04 21:58:28 wessels Exp $
+ * $Id: neighbors.cc,v 1.274 1999/05/11 18:45:46 wessels Exp $
*
* DEBUG: section 15 Neighbor Routines
* AUTHOR: Harvest Derived
peer *p;
int p_rtt;
int i;
-
+ if (!request->flags.hierarchical)
+ return NULL;
key = storeKeyPublic(storeUrl(entry), request->method);
for (i = 0, p = first_ping; i++ < Config.npeers; p = p->next) {
lookup_t lookup;