/*
- * $Id: cache_manager.cc,v 1.36 2006/02/17 18:10:59 wessels Exp $
+ * $Id: cache_manager.cc,v 1.37 2006/02/17 20:15:35 wessels Exp $
*
* DEBUG: section 16 Cache Manager Objects
* AUTHOR: Duane Wessels
httpHeaderPutAuth(&rep->header, "Basic", mgr->action);
/* store the reply */
- storeEntryReplaceObject(entry, rep);
+ entry->replaceHttpReply(rep);
entry->expires = squid_curtime;
-1, /* C-Len */
squid_curtime, /* LMT */
squid_curtime);
- storeEntryReplaceObject(entry, rep);
+ entry->replaceHttpReply(rep);
}
a->handler(entry);
/*
- * $Id: client_side_reply.cc,v 1.95 2006/02/17 18:10:59 wessels Exp $
+ * $Id: client_side_reply.cc,v 1.96 2006/02/17 20:15:35 wessels Exp $
*
* DEBUG: section 88 Client-side Reply Routines
* AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
* reply has a meaningful Age: header.
*/
e->timestamp = timestamp;
- storeEntryReplaceObject(e, temprep);
+ e->replaceHttpReply(temprep);
e->complete();
/* TODO: why put this in the store and then serialise it and then parse it again.
* Simply mark the request complete in our context and
storeReleaseRequest(http->storeEntry());
rep->redirect(http->redirect.status, http->redirect.location);
- storeEntryReplaceObject(http->storeEntry(), rep);
+ http->storeEntry()->replaceHttpReply(rep);
http->storeEntry()->complete();
return;
}
r->setHeaders(version, purgeStatus, NULL, NULL, 0, 0, -1);
- storeEntryReplaceObject(http->storeEntry(), r);
+ http->storeEntry()->replaceHttpReply(r);
http->storeEntry()->complete();
}
HttpVersion version(1,0);
rep->setHeaders(version, HTTP_OK, NULL, "text/plain",
http->request->prefixLen(), 0, squid_curtime);
- storeEntryReplaceObject(http->storeEntry(), rep);
+ http->storeEntry()->replaceHttpReply(rep);
http->request->swapOut(http->storeEntry());
http->storeEntry()->complete();
}
/*
- * $Id: errorpage.cc,v 1.207 2006/02/17 18:10:59 wessels Exp $
+ * $Id: errorpage.cc,v 1.208 2006/02/17 20:15:35 wessels Exp $
*
* DEBUG: section 4 Error Generation
* AUTHOR: Duane Wessels
* on 407/401 responses, and do not check the accel state on 401/407 responses
*/
authenticateFixHeader(rep, err->auth_user_request, err->request, 0, 1);
- storeEntryReplaceObject(entry, rep);
+ entry->replaceHttpReply(rep);
EBIT_CLR(entry->flags, ENTRY_FWD_HDR_WAIT);
storeBufferFlush(entry);
entry->complete();
/*
- * $Id: ftp.cc,v 1.384 2006/02/17 18:10:59 wessels Exp $
+ * $Id: ftp.cc,v 1.385 2006/02/17 20:15:35 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
/* create appropriate reply */
HttpReply *reply = ftpAuthRequired(request, realm);
- storeEntryReplaceObject(entry, reply);
+ entry->replaceHttpReply(reply);
fwd->complete();
#endif
- storeEntryReplaceObject(e, reply);
+ e->replaceHttpReply(reply);
storeTimestampsSet(e);
}
assert (rep);
- storeEntryReplaceObject(entry, rep);
+ entry->replaceHttpReply(rep);
HTTPMSGUNLOCK(reply);
reply = HTTPMSGLOCK(rep);
/*
- * $Id: http.cc,v 1.486 2006/02/17 18:10:59 wessels Exp $
+ * $Id: http.cc,v 1.487 2006/02/17 20:15:35 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
{
reply->sline.version = HttpVersion(1, 0);
reply->sline.status = status;
- storeEntryReplaceObject (entry, reply);
+ entry->replaceHttpReply(reply);
if (eof == 1) {
transactionComplete();
#endif
- storeEntryReplaceObject(entry, reply);
+ entry->replaceHttpReply(reply);
haveParsedReplyHeaders();
if (service == NULL) {
// handle case where no service is selected;
- storeEntryReplaceObject(entry, reply);
+ entry->replaceHttpReply(reply);
haveParsedReplyHeaders();
processReplyBody();
}
assert (rep);
- storeEntryReplaceObject(entry, rep);
+ entry->replaceHttpReply(rep);
HTTPMSGUNLOCK(reply);
reply = HTTPMSGLOCK(rep);
/*
- * $Id: internal.cc,v 1.36 2006/02/17 18:10:59 wessels Exp $
+ * $Id: internal.cc,v 1.37 2006/02/17 20:15:35 wessels Exp $
*
* DEBUG: section 76 Internal Squid Object handling
* AUTHOR: Duane, Alex, Henrik
strlen(msgbuf),
squid_curtime,
-2);
- storeEntryReplaceObject(entry, reply);
+ entry->replaceHttpReply(reply);
storeAppend(entry, msgbuf, strlen(msgbuf));
entry->complete();
} else {
/*
- * $Id: mime.cc,v 1.122 2006/02/17 18:10:59 wessels Exp $
+ * $Id: mime.cc,v 1.123 2006/02/17 20:15:35 wessels Exp $
*
* DEBUG: section 25 MIME Parsing
* AUTHOR: Harvest Derived
httpHeaderPutCc(&reply->header, reply->cache_control);
- storeEntryReplaceObject(e, reply);
+ e->replaceHttpReply(reply);
/* read the file into the buffer and append it to store */
buf = (char *)memAllocate(MEM_4K_BUF);
/*
- * $Id: net_db.cc,v 1.182 2006/02/17 18:10:59 wessels Exp $
+ * $Id: net_db.cc,v 1.183 2006/02/17 20:15:35 wessels Exp $
*
* DEBUG: section 38 Network Measurement Database
* AUTHOR: Duane Wessels
storeBuffer(s);
HttpVersion version(1, 0);
reply->setHeaders(version, HTTP_OK, "OK", NULL, -1, squid_curtime, -2);
- storeEntryReplaceObject(s, reply);
+ s->replaceHttpReply(reply);
rec_sz = 0;
rec_sz += 1 + sizeof(addr.s_addr);
rec_sz += 1 + sizeof(int);
HttpVersion version(1,0);
reply->setHeaders(version, HTTP_BAD_REQUEST, "Bad Request",
NULL, -1, squid_curtime, -2);
- storeEntryReplaceObject(s, reply);
+ s->replaceHttpReply(reply);
storeAppendPrintf(s, "NETDB support not compiled into this Squid cache.\n");
#endif
/*
- * $Id: store.cc,v 1.583 2006/01/23 20:04:24 wessels Exp $
+ * $Id: store.cc,v 1.584 2006/02/17 20:15:35 wessels Exp $
*
* DEBUG: section 20 Storage Manager
* AUTHOR: Harvest Derived
#endif
-/* Replace a store entry with
+/*
+ * Replace a store entry with
* a new reply. This eats the reply.
*/
-void
-storeEntryReplaceObject(StoreEntry * e, HttpReply * rep)
-{
- e->replaceHttpReply(rep);
-}
-
void
StoreEntry::replaceHttpReply(HttpReply *rep)
{
- debug(20, 3) ("storeEntryReplaceObject: %s\n", storeUrl(this));
+ debug(20, 3) ("StoreEntry::replaceHttpReply: %s\n", storeUrl(this));
Packer p;
if (!mem_obj) {
mem_obj->replaceHttpReply(rep);
-#if OLD
- /* TODO: check that there is at most 1 store client ? */
- HttpReply *myrep = (HttpReply *)e->getReply(); /* we are allowed to do this */
-
- /* move info to the mem_obj->reply */
- myrep->absorb(rep);
-#endif
-
/* TODO: when we store headers serparately remove the header portion */
/* TODO: mark the length of the headers ? */
/* We ONLY want the headers */
/*
- * $Id: store_digest.cc,v 1.62 2006/02/17 18:10:59 wessels Exp $
+ * $Id: store_digest.cc,v 1.63 2006/02/17 20:15:35 wessels Exp $
*
* DEBUG: section 71 Store Digest Manager
* AUTHOR: Alex Rousskov
debug(71, 3) ("storeDigestRewrite: entry expires on %ld (%+d)\n",
(long int) rep->expires, (int) (rep->expires - squid_curtime));
storeBuffer(e);
- storeEntryReplaceObject(e, rep);
+ e->replaceHttpReply(rep);
storeDigestCBlockSwapOut(e);
storeBufferFlush(e);
eventAdd("storeDigestSwapOutStep", storeDigestSwapOutStep, sd_state.rewrite_lock, 0.0, 1);
/*
- * $Id: urn.cc,v 1.95 2006/02/17 18:10:59 wessels Exp $
+ * $Id: urn.cc,v 1.96 2006/02/17 20:15:35 wessels Exp $
*
* DEBUG: section 52 URN Parsing
* AUTHOR: Kostas Anagnostakis
httpBodySet(&rep->body, mb);
/* don't clean or delete mb; rep->body owns it now */
- storeEntryReplaceObject(e, rep);
+ e->replaceHttpReply(rep);
e->complete();
for (i = 0; i < urlcnt; i++) {
/*
- * $Id: whois.cc,v 1.32 2006/01/03 17:22:31 wessels Exp $
+ * $Id: whois.cc,v 1.33 2006/02/17 20:15:35 wessels Exp $
*
* DEBUG: section 75 WHOIS protocol
* AUTHOR: Duane Wessels, Kostas Anagnostakis
storeBuffer(entry);
HttpVersion version(1, 0);
reply->setHeaders(version, HTTP_OK, "Gatewaying", "text/plain", -1, -1, -2);
- storeEntryReplaceObject (entry, reply);
+ entry->replaceHttpReply(reply);
}
void