/*
- * DEBUG: section 93 ICAP (RFC 3507) Client
+ * 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.
+ * Please see the COPYING and CONTRIBUTORS files for details.
*/
+/* DEBUG: section 93 ICAP (RFC 3507) Client */
+
#include "squid.h"
#include "acl/FilledChecklist.h"
#include "adaptation/Answer.h"
+#include "adaptation/icap/Config.h"
#include "adaptation/icap/Launcher.h"
-#include "adaptation/icap/Xaction.h"
#include "adaptation/icap/ServiceRep.h"
-#include "adaptation/icap/Config.h"
+#include "adaptation/icap/Xaction.h"
#include "base/TextException.h"
#include "globals.h"
#include "HttpMsg.h"
-#include "HttpRequest.h"
#include "HttpReply.h"
+#include "HttpRequest.h"
Adaptation::Icap::Launcher::Launcher(const char *aTypeName,
Adaptation::ServicePointer &aService):
- AsyncJob(aTypeName),
- Adaptation::Initiate(aTypeName),
- theService(aService), theXaction(0), theLaunches(0)
+ AsyncJob(aTypeName),
+ Adaptation::Initiate(aTypeName),
+ theService(aService), theXaction(0), theLaunches(0)
{
}
if (!info.icapReply) // did not get to read an ICAP reply; a timeout?
return true;
- debugs(93,9, HERE << info.icapReply->sline.status);
- if (!info.icapReply->sline.status) // failed to parse the reply; I/O err
+ debugs(93,9, info.icapReply->sline.status());
+ // XXX: Http::scNone is not the only sign of parse error
+ // XXX: if there is a specific HTTP error code describing the problem, that may be set
+ if (info.icapReply->sline.status() == Http::scNone) // failed to parse the reply; I/O err
return true;
ACLFilledChecklist *cl =
Adaptation::Icap::XactAbortInfo::XactAbortInfo(HttpRequest *anIcapRequest,
HttpReply *anIcapReply, bool beRetriable, bool beRepeatable):
- icapRequest(anIcapRequest),
- icapReply(anIcapReply),
- isRetriable(beRetriable),
- isRepeatable(beRepeatable)
+ icapRequest(anIcapRequest),
+ icapReply(anIcapReply),
+ isRetriable(beRetriable),
+ isRepeatable(beRepeatable)
{
if (icapRequest)
HTTPMSGLOCK(icapRequest);
}
Adaptation::Icap::XactAbortInfo::XactAbortInfo(const Adaptation::Icap::XactAbortInfo &i):
- icapRequest(i.icapRequest),
- icapReply(i.icapReply),
- isRetriable(i.isRetriable),
- isRepeatable(i.isRepeatable)
+ icapRequest(i.icapRequest),
+ icapReply(i.icapReply),
+ isRetriable(i.isRetriable),
+ isRepeatable(i.isRepeatable)
{
if (icapRequest)
HTTPMSGLOCK(icapRequest);
HTTPMSGUNLOCK(icapRequest);
HTTPMSGUNLOCK(icapReply);
}
+