/*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
else
url = xstrdup(internalRemoteUri(p->host, p->http_port, "/squid-internal-periodic/", SBuf(StoreDigestFileName)));
- req = HttpRequest::CreateFromUrl(url);
+ const MasterXaction::Pointer mx = new MasterXaction(XactionInitiator::initCacheDigest);
+ req = HttpRequest::FromUrl(url, mx);
assert(req);
/* set lastmod to trigger IMS request if possible */
if (old_e)
- e->lastmod = old_e->lastmod;
+ e->lastModified(old_e->lastModified());
/* push towards peer cache */
debugs(72, 3, "peerDigestRequest: forwarding to fwdStart...");
/* our old entry is fine */
assert(fetch->old_entry);
- if (!fetch->old_entry->mem_obj->request) {
+ if (!fetch->old_entry->mem_obj->request)
fetch->old_entry->mem_obj->request = fetch->entry->mem_obj->request;
- HTTPMSGLOCK(fetch->old_entry->mem_obj->request);
- }
assert(fetch->old_entry->mem_obj->request);
- HttpReply *old_rep = (HttpReply *) fetch->old_entry->getReply();
-
- old_rep->updateOnNotModified(reply);
-
- fetch->old_entry->timestampsSet();
+ Store::Root().updateOnNotModified(fetch->old_entry, *fetch->entry);
/* get rid of 304 reply */
storeUnregister(fetch->sc, fetch->entry, fetch);
if (!reason && !size) {
if (!pd->cd)
reason = "null digest?!";
- else if (fetch->mask_offset != (int)pd->cd->mask_size)
+ else if (fetch->mask_offset != pd->cd->mask_size)
reason = "premature end of digest?!";
else if (!peerDigestUseful(pd))
reason = "useless digest";
debugs(72, 3, "peerDigestFetchFinish: expires: " <<
(long int) fetch->expires << " (" << std::showpos <<
(int) (fetch->expires - squid_curtime) << "), lmt: " <<
- std::noshowpos << (long int) fetch->entry->lastmod << " (" <<
- std::showpos << (int) (fetch->entry->lastmod - squid_curtime) <<
+ std::noshowpos << (long int) fetch->entry->lastModified() << " (" <<
+ std::showpos << (int) (fetch->entry->lastModified() - squid_curtime) <<
")");
}