From: wessels <> Date: Thu, 5 Sep 1996 22:59:49 +0000 (+0000) Subject: When switching back to old entry from IMS, we need a request structure, X-Git-Tag: SQUID_3_0_PRE1~5850 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4de5fbc36dbac700b3517b0d63ebd8ca7b772d60;p=thirdparty%2Fsquid.git When switching back to old entry from IMS, we need a request structure, so temporarily use the one from the originating entry. --- diff --git a/src/client_side.cc b/src/client_side.cc index 15311672fe..638d2dbf3c 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.15 1996/09/04 22:03:20 wessels Exp $ + * $Id: client_side.cc,v 1.16 1996/09/05 16:59:49 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -405,18 +405,19 @@ int icpHandleIMSReply(fd, entry, data) icpState->log_type = LOG_TCP_EXPIRED_HIT; /* We initiated the IMS request, the client is not expecting * 304, so put the good one back */ + if (icpState->old_entry->mem_obj->request == NULL) + icpState->old_entry->mem_obj->request = requestLink(mem->request); storeUnlockObject(entry); entry = icpState->entry = icpState->old_entry; /* Extend the TTL - * * XXX race condition here. Assumes old_entry has been swapped - * * in by the time this 304 reply arrives. */ + * XXX race condition here. Assumes old_entry has been swapped + * in by the time this 304 reply arrives. */ storeClientCopy(entry, 0, 8191, hbuf, &len, fd); if (!mime_headers_end(hbuf)) fatal_dump("icpHandleIMSReply: failed to load headers, lost race"); httpParseHeaders(hbuf, entry->mem_obj->reply); - debug(44, 0, "OLD EXPIRES=%d\n", entry->expires); ttlSet(entry); - debug(44, 0, "NEW EXPIRES=%d\n", entry->expires); + requestUnlink(entry->mem_obj->request); } else { /* the client can handle this reply, whatever it is */ icpState->log_type = LOG_TCP_EXPIRED_MISS;