From: Alex Rousskov Date: Tue, 13 Sep 2016 20:41:12 +0000 (-0600) Subject: Fixed r14838 build whithout adaptation support. X-Git-Tag: SQUID_4_0_15~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25dadb9815f46516414ac851062718a5bd52a71e;p=thirdparty%2Fsquid.git Fixed r14838 build whithout adaptation support. --- diff --git a/src/format/Format.cc b/src/format/Format.cc index f007e982c9..8e1aec6d92 100644 --- a/src/format/Format.cc +++ b/src/format/Format.cc @@ -334,18 +334,22 @@ static const HttpMsg * actualReplyHeader(const AccessLogEntry::Pointer &al) { const HttpMsg *msg = al->reply; +#if USE_ADAPTATION if (!msg && al->icap.reqMethod == Adaptation::methodReqmod) msg = al->adapted_request; +#endif return msg; } static const HttpMsg * actualRequestHeader(const AccessLogEntry::Pointer &al) { +#if USE_ADAPTATION if (al->icap.reqMethod == Adaptation::methodRespmod) { // XXX: for now AccessLogEntry lacks virgin response headers return nullptr; } +#endif return al->request; } @@ -852,11 +856,14 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS break; case LFT_REQUEST_ALL_HEADERS: +#if USE_ADAPTATION if (al->icap.reqMethod == Adaptation::methodRespmod) { // XXX: since AccessLogEntry::Headers lacks virgin response // headers, do nothing for now out = nullptr; - } else { + } else +#endif + { out = al->headers.request; } @@ -873,8 +880,10 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS case LFT_REPLY_ALL_HEADERS: out = al->headers.reply; +#if USE_ADAPTATION if (!out && al->icap.reqMethod == Adaptation::methodReqmod) out = al->headers.adapted_request; +#endif quote = 1;