/*
- * $Id: ChunkedCodingParser.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: ChunkedCodingParser.h,v 1.2 2005/11/21 23:46:27 wessels Exp $
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
* ----------------------------------------------------------
/*
- * $Id: ICAPClient.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: ICAPClient.h,v 1.2 2005/11/21 23:46:27 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
#include "MsgPipeSource.h"
#include "MsgPipeSink.h"
#include "HttpRequest.h"
-#include "ICAPClientSideHook.h"
+#include "ICAPClientReqmodPrecache.h"
#include "ICAPServiceRep.h"
#include "ICAPClient.h"
extern LeakFinder *MsgPipeLeaker;
-CBDATA_CLASS_INIT(ICAPClientSideHook);
+CBDATA_CLASS_INIT(ICAPClientReqmodPrecache);
-ICAPClientSideHook::ICAPClientSideHook(ICAPServiceRep::Pointer aService): service(aService), http(NULL), virgin(NULL), adapted(NULL)
+ICAPClientReqmodPrecache::ICAPClientReqmodPrecache(ICAPServiceRep::Pointer aService): service(aService), http(NULL), virgin(NULL), adapted(NULL)
{
- debug(93,3)("ICAPClientSideHook constructed, this=%p\n", this);
+ debug(93,3)("ICAPClientReqmodPrecache constructed, this=%p\n", this);
}
-ICAPClientSideHook::~ICAPClientSideHook()
+ICAPClientReqmodPrecache::~ICAPClientReqmodPrecache()
{
stop(notifyNone);
cbdataReferenceDone(http);
- debug(93,3)("ICAPClientSideHook destructed, this=%p\n", this);
+ debug(93,3)("ICAPClientReqmodPrecache destructed, this=%p\n", this);
if (virgin != NULL)
freeVirgin();
freeAdapted();
}
-void ICAPClientSideHook::startReqMod(ClientHttpRequest *aHttp, HttpRequest *request)
+void ICAPClientReqmodPrecache::startReqMod(ClientHttpRequest *aHttp, HttpRequest *request)
{
- debug(93,3)("ICAPClientSideHook::startReqMod() called\n");
+ debug(93,3)("ICAPClientReqmodPrecache::startReqMod() called\n");
http = cbdataReference(aHttp);
virgin = new MsgPipe("virgin"); // this is the place to create a refcount ptr
adapted->sendSinkNeed(); // we want adapted response, eventially
}
-void ICAPClientSideHook::sendMoreData(StoreIOBuffer buf)
+void ICAPClientReqmodPrecache::sendMoreData(StoreIOBuffer buf)
{
- debug(93,3)("ICAPClientSideHook::sendMoreData() called\n");
+ debug(93,3)("ICAPClientReqmodPrecache::sendMoreData() called\n");
//buf.dump();
/*
* The caller is responsible for not giving us more data
}
int
-ICAPClientSideHook::potentialSpaceSize()
+ICAPClientReqmodPrecache::potentialSpaceSize()
{
if (virgin == NULL)
return 0;
}
// ClientHttpRequest says we have the entire HTTP message
-void ICAPClientSideHook::doneSending()
+void ICAPClientReqmodPrecache::doneSending()
{
- debug(93,3)("ICAPClientSideHook::doneSending() called\n");
+ debug(93,3)("ICAPClientReqmodPrecache::doneSending() called\n");
leakTouch(virgin.getRaw(), MsgPipeLeaker);
virgin->sendSourceFinish();
}
// ClientHttpRequest tells us to abort
-void ICAPClientSideHook::ownerAbort()
+void ICAPClientReqmodPrecache::ownerAbort()
{
- debug(93,3)("ICAPClientSideHook::ownerAbort() called\n");
+ debug(93,3)("ICAPClientReqmodPrecache::ownerAbort() called\n");
stop(notifyIcap);
}
// ICAP client needs more virgin response data
-void ICAPClientSideHook::noteSinkNeed(MsgPipe *p)
+void ICAPClientReqmodPrecache::noteSinkNeed(MsgPipe *p)
{
- debug(93,3)("ICAPClientSideHook::noteSinkNeed() called\n");
+ debug(93,3)("ICAPClientReqmodPrecache::noteSinkNeed() called\n");
leakTouch(virgin.getRaw(), MsgPipeLeaker);
}
// ICAP client aborting
-void ICAPClientSideHook::noteSinkAbort(MsgPipe *p)
+void ICAPClientReqmodPrecache::noteSinkAbort(MsgPipe *p)
{
- debug(93,3)("ICAPClientSideHook::noteSinkAbort() called\n");
+ debug(93,3)("ICAPClientReqmodPrecache::noteSinkAbort() called\n");
stop(notifyOwner);
}
// ICAP client starts sending adapted response
// ICAP client has received new HTTP headers (if any) at this point
-void ICAPClientSideHook::noteSourceStart(MsgPipe *p)
+void ICAPClientReqmodPrecache::noteSourceStart(MsgPipe *p)
{
- debug(93,3)("ICAPClientSideHook::noteSourceStart() called\n");
+ debug(93,3)("ICAPClientReqmodPrecache::noteSourceStart() called\n");
leakTouch(adapted.getRaw(), MsgPipeLeaker);
http->takeAdaptedHeaders(adapted->data->header);
noteSourceProgress(p);
}
// ICAP client sends more data
-void ICAPClientSideHook::noteSourceProgress(MsgPipe *p)
+void ICAPClientReqmodPrecache::noteSourceProgress(MsgPipe *p)
{
- debug(93,3)("ICAPClientSideHook::noteSourceProgress() called\n");
+ debug(93,3)("ICAPClientReqmodPrecache::noteSourceProgress() called\n");
//tell ClientHttpRequest to store a fresh portion of the adapted response
leakTouch(p, MsgPipeLeaker);
}
// ICAP client is done sending adapted response
-void ICAPClientSideHook::noteSourceFinish(MsgPipe *p)
+void ICAPClientReqmodPrecache::noteSourceFinish(MsgPipe *p)
{
- debug(93,3)("ICAPClientSideHook::noteSourceFinish() called\n");
+ debug(93,3)("ICAPClientReqmodPrecache::noteSourceFinish() called\n");
//tell ClientHttpRequest that we expect no more response data
leakTouch(p, MsgPipeLeaker);
http->doneAdapting();
}
// ICAP client is aborting
-void ICAPClientSideHook::noteSourceAbort(MsgPipe *p)
+void ICAPClientReqmodPrecache::noteSourceAbort(MsgPipe *p)
{
- debug(93,3)("ICAPClientSideHook::noteSourceAbort() called\n");
+ debug(93,3)("ICAPClientReqmodPrecache::noteSourceAbort() called\n");
leakTouch(p, MsgPipeLeaker);
stop(notifyOwner);
}
// internal cleanup
-void ICAPClientSideHook::stop(Notify notify)
+void ICAPClientReqmodPrecache::stop(Notify notify)
{
if (virgin != NULL) {
leakTouch(virgin.getRaw(), MsgPipeLeaker);
}
}
-void ICAPClientSideHook::freeVirgin()
+void ICAPClientReqmodPrecache::freeVirgin()
{
// virgin->data->cause should be NULL;
requestUnlink(dynamic_cast<HttpRequest*>(virgin->data->header));
virgin = NULL; // refcounted
}
-void ICAPClientSideHook::freeAdapted()
+void ICAPClientReqmodPrecache::freeAdapted()
{
adapted->data->header = NULL; // we don't own it
leakTouch(adapted.getRaw(), MsgPipeLeaker);
/*
- * $Id: ICAPClientSideHook.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: ICAPClientReqmodPrecache.h,v 1.1 2005/11/21 23:46:27 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
#include "MsgPipeSource.h"
#include "MsgPipeSink.h"
-/* The ICAP ClientSideHook implements message pipe sink and source interfaces. It
+/* The ICAP ClientReqmodPrecache implements message pipe sink and source interfaces. It
* helps client-side to marshall the incoming/virgin HTTP message (being
* recieved from the HTTP client) to Squid's ICAP client module, using the
* MsgPipe interface. The same interface is used to get the adapted HTTP
* message back from the ICAP client. client-side is the "owner" of the
- * ICAPClientSideHook.
+ * ICAPClientReqmodPrecache.
*/
class HttpRequest;
class ClientRequestContext;
-class ICAPClientSideHook: public MsgPipeSource, public MsgPipeSink
+class ICAPClientReqmodPrecache: public MsgPipeSource, public MsgPipeSink
{
public:
- ICAPClientSideHook(ICAPServiceRep::Pointer);
- virtual ~ICAPClientSideHook();
+ ICAPClientReqmodPrecache(ICAPServiceRep::Pointer);
+ virtual ~ICAPClientReqmodPrecache();
// synchronous calls called by ClientHttpRequest
void startReqMod(ClientHttpRequest *, HttpRequest *);
void stop(Notify notify);
void freeVirgin();
void freeAdapted();
- CBDATA_CLASS2(ICAPClientSideHook);
+ CBDATA_CLASS2(ICAPClientReqmodPrecache);
};
#endif /* SQUID_ICAPCLIENTSIDEHOOK_H */
#include "MsgPipeSink.h"
#include "HttpRequest.h"
#include "HttpReply.h"
-#include "ICAPAnchor.h"
+#include "ICAPClientRespmodPrecache.h"
#include "ICAPClient.h"
#include "ICAPServiceRep.h"
#include "LeakFinder.h"
-CBDATA_CLASS_INIT(ICAPAnchor);
+CBDATA_CLASS_INIT(ICAPClientRespmodPrecache);
extern LeakFinder *MsgPipeLeaker;
-ICAPAnchor::ICAPAnchor(ICAPServiceRep::Pointer aService): service(aService), httpState(NULL), virgin(NULL), adapted(NULL)
+ICAPClientRespmodPrecache::ICAPClientRespmodPrecache(ICAPServiceRep::Pointer aService): service(aService), httpState(NULL), virgin(NULL), adapted(NULL)
{
- debug(93,5)("ICAPAnchor constructed, this=%p\n", this);
+ debug(93,5)("ICAPClientRespmodPrecache constructed, this=%p\n", this);
}
-ICAPAnchor::~ICAPAnchor()
+ICAPClientRespmodPrecache::~ICAPClientRespmodPrecache()
{
stop(notifyNone);
cbdataReferenceDone(httpState);
- debug(93,5)("ICAPAnchor destructed, this=%p\n", this);
+ debug(93,5)("ICAPClientRespmodPrecache destructed, this=%p\n", this);
if (virgin != NULL)
freeVirgin();
service = NULL;
}
-void ICAPAnchor::startRespMod(HttpStateData *anHttpState, HttpRequest *request, HttpReply *reply)
+void ICAPClientRespmodPrecache::startRespMod(HttpStateData *anHttpState, HttpRequest *request, HttpReply *reply)
{
httpState = cbdataReference(anHttpState);
adapted->sendSinkNeed(); // we want adapted response, eventially
}
-void ICAPAnchor::sendMoreData(StoreIOBuffer buf)
+void ICAPClientRespmodPrecache::sendMoreData(StoreIOBuffer buf)
{
- debug(93,5)("ICAPAnchor::sendMoreData() called\n");
+ debug(93,5)("ICAPClientRespmodPrecache::sendMoreData() called\n");
//buf.dump();
/*
* The caller is responsible for not giving us more data
}
int
-ICAPAnchor::potentialSpaceSize()
+ICAPClientRespmodPrecache::potentialSpaceSize()
{
if (virgin == NULL)
return 0;
}
// HttpStateData says we have the entire HTTP message
-void ICAPAnchor::doneSending()
+void ICAPClientRespmodPrecache::doneSending()
{
- debug(93,5)("ICAPAnchor::doneSending() called\n");
+ debug(93,5)("ICAPClientRespmodPrecache::doneSending() called\n");
#if ICAP_ANCHOR_LOOPBACK
/* simple assignments are not the right way to do this */
}
// HttpStateData tells us to abort
-void ICAPAnchor::ownerAbort()
+void ICAPClientRespmodPrecache::ownerAbort()
{
- debug(93,5)("ICAPAnchor::ownerAbort() called\n");
+ debug(93,5)("ICAPClientRespmodPrecache::ownerAbort() called\n");
stop(notifyIcap);
}
// ICAP client needs more virgin response data
-void ICAPAnchor::noteSinkNeed(MsgPipe *p)
+void ICAPClientRespmodPrecache::noteSinkNeed(MsgPipe *p)
{
- debug(93,5)("ICAPAnchor::noteSinkNeed() called\n");
+ debug(93,5)("ICAPClientRespmodPrecache::noteSinkNeed() called\n");
leakTouch(virgin.getRaw(), MsgPipeLeaker);
}
// ICAP client aborting
-void ICAPAnchor::noteSinkAbort(MsgPipe *p)
+void ICAPClientRespmodPrecache::noteSinkAbort(MsgPipe *p)
{
- debug(93,5)("ICAPAnchor::noteSinkAbort() called\n");
+ debug(93,5)("ICAPClientRespmodPrecache::noteSinkAbort() called\n");
stop(notifyOwner);
}
// ICAP client starts sending adapted response
// ICAP client has received new HTTP headers (if any) at this point
-void ICAPAnchor::noteSourceStart(MsgPipe *p)
+void ICAPClientRespmodPrecache::noteSourceStart(MsgPipe *p)
{
- debug(93,5)("ICAPAnchor::noteSourceStart() called\n");
+ debug(93,5)("ICAPClientRespmodPrecache::noteSourceStart() called\n");
leakTouch(adapted.getRaw(), MsgPipeLeaker);
HttpReply *reply = dynamic_cast<HttpReply*>(adapted->data->header);
}
// ICAP client sends more data
-void ICAPAnchor::noteSourceProgress(MsgPipe *p)
+void ICAPClientRespmodPrecache::noteSourceProgress(MsgPipe *p)
{
- debug(93,5)("ICAPAnchor::noteSourceProgress() called\n");
+ debug(93,5)("ICAPClientRespmodPrecache::noteSourceProgress() called\n");
//tell HttpStateData to store a fresh portion of the adapted response
leakTouch(p, MsgPipeLeaker);
}
// ICAP client is done sending adapted response
-void ICAPAnchor::noteSourceFinish(MsgPipe *p)
+void ICAPClientRespmodPrecache::noteSourceFinish(MsgPipe *p)
{
- debug(93,5)("ICAPAnchor::noteSourceFinish() called\n");
+ debug(93,5)("ICAPClientRespmodPrecache::noteSourceFinish() called\n");
//tell HttpStateData that we expect no more response data
leakTouch(p, MsgPipeLeaker);
httpState->doneAdapting();
}
// ICAP client is aborting
-void ICAPAnchor::noteSourceAbort(MsgPipe *p)
+void ICAPClientRespmodPrecache::noteSourceAbort(MsgPipe *p)
{
- debug(93,5)("ICAPAnchor::noteSourceAbort() called\n");
+ debug(93,5)("ICAPClientRespmodPrecache::noteSourceAbort() called\n");
leakTouch(p, MsgPipeLeaker);
stop(notifyOwner);
}
// internal cleanup
-void ICAPAnchor::stop(Notify notify)
+void ICAPClientRespmodPrecache::stop(Notify notify)
{
if (virgin != NULL) {
leakTouch(virgin.getRaw(), MsgPipeLeaker);
}
}
-void ICAPAnchor::freeVirgin()
+void ICAPClientRespmodPrecache::freeVirgin()
{
requestUnlink(virgin->data->cause);
virgin->data->cause = NULL;
virgin = NULL; // refcounted
}
-void ICAPAnchor::freeAdapted()
+void ICAPClientRespmodPrecache::freeAdapted()
{
/*
* Note on adapted->data->header. ICAPXaction-side created it
/*
- * $Id: ICAPAnchor.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: ICAPClientRespmodPrecache.h,v 1.1 2005/11/21 23:46:27 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
* recieved from the HTTP server) to Squid's ICAP client module, using the
* MsgPipe interface. The same interface is used to get the adapted HTTP
* message back from the ICAP client. HttpStateData is the "owner" of the
- * ICAPAnchor.
+ * ICAPClientRespmodPrecache.
*/
class HttpRequest;
class HttpReply;
-class ICAPAnchor: public MsgPipeSource, public MsgPipeSink
+class ICAPClientRespmodPrecache: public MsgPipeSource, public MsgPipeSink
{
public:
- ICAPAnchor(ICAPServiceRep::Pointer);
- virtual ~ICAPAnchor();
+ ICAPClientRespmodPrecache(ICAPServiceRep::Pointer);
+ virtual ~ICAPClientRespmodPrecache();
// synchronous calls called by HttpStateData
void startRespMod(HttpStateData *anHttpState, HttpRequest *request, HttpReply *reply);
void stop(Notify notify);
void freeVirgin();
void freeAdapted();
- CBDATA_CLASS2(ICAPAnchor);
+ CBDATA_CLASS2(ICAPClientRespmodPrecache);
};
#endif /* SQUID_ICAPANCHOR_H */
/*
- * $Id: ICAPConfig.cc,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: ICAPConfig.cc,v 1.2 2005/11/21 23:46:27 wessels Exp $
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
* ----------------------------------------------------------
/*
- * $Id: ICAPConfig.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: ICAPConfig.h,v 1.2 2005/11/21 23:46:27 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/*
- * $Id: ICAPElements.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: ICAPElements.h,v 1.2 2005/11/21 23:46:27 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/*
* Note on adapted->data->header: we created the header, but allow the
- * other side (ICAPAnchor) to take control of it. We won't touch it here
+ * other side (ICAPClientRespmodPrecache) to take control of it. We won't touch it here
* and instead rely on the Anchor-side to make sure it is properly freed.
*/
adapted = NULL; // refcounted
/*
- * $Id: ICAPModXact.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: ICAPModXact.h,v 1.2 2005/11/21 23:46:27 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/*
- * $Id: ICAPOptXact.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: ICAPOptXact.h,v 1.2 2005/11/21 23:46:27 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/*
- * $Id: ICAPOptions.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: ICAPOptions.h,v 1.2 2005/11/21 23:46:27 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/*
- * $Id: ICAPServiceRep.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: ICAPServiceRep.h,v 1.2 2005/11/21 23:46:27 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/*
- * $Id: ICAPXaction.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: ICAPXaction.h,v 1.2 2005/11/21 23:46:27 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/*
- * $Id: MsgPipe.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: MsgPipe.h,v 1.2 2005/11/21 23:46:27 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/*
- * $Id: MsgPipeData.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: MsgPipeData.h,v 1.2 2005/11/21 23:46:27 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/*
- * $Id: MsgPipeEnd.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: MsgPipeEnd.h,v 1.2 2005/11/21 23:46:27 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/*
- * $Id: MsgPipeSink.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: MsgPipeSink.h,v 1.2 2005/11/21 23:46:27 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/*
- * $Id: MsgPipeSource.h,v 1.1 2005/11/21 23:32:59 wessels Exp $
+ * $Id: MsgPipeSource.h,v 1.2 2005/11/21 23:46:27 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/