From: mkishi Date: Wed, 17 Aug 2016 05:48:29 +0000 (+1200) Subject: Bug 3025: Proxy-Authenticate problem using ICAP server X-Git-Tag: SQUID_3_5_21~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4be0aa0c7a153ba05a55b077ddae7d96088bbcc2;p=thirdparty%2Fsquid.git Bug 3025: Proxy-Authenticate problem using ICAP server --- diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index cc8bf80ee4..c9f9e123b5 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -1305,8 +1305,14 @@ clientReplyContext::buildReplyHeader() // if there is not configured a peer proxy with login=PASS or login=PASSTHRU option enabled // remove the Proxy-Authenticate header - if ( !request->peer_login || (strcmp(request->peer_login,"PASS") != 0 && strcmp(request->peer_login,"PASSTHRU") != 0)) - reply->header.delById(HDR_PROXY_AUTHENTICATE); + if ( !request->peer_login || (strcmp(request->peer_login,"PASS") != 0 && strcmp(request->peer_login,"PASSTHRU") != 0)) { +#if USE_ADAPTATION + // but allow adaptation services to authenticate clients + // via request satisfaction + if (!http->requestSatisfactionMode()) +#endif + reply->header.delById(HDR_PROXY_AUTHENTICATE); + } reply->header.removeHopByHopEntries(); diff --git a/src/client_side_request.h b/src/client_side_request.h index 442d36215e..e3869056d9 100644 --- a/src/client_side_request.h +++ b/src/client_side_request.h @@ -140,6 +140,7 @@ public: public: void startAdaptation(const Adaptation::ServiceGroupPointer &g); + bool requestSatisfactionMode() const { return request_satisfaction_mode; } // private but exposed for ClientRequestContext void handleAdaptationFailure(int errDetail, bool bypassable = false);