From: mkishi Date: Mon, 15 Aug 2016 14:44:43 +0000 (+1200) Subject: Bug 3025: Proxy-Authenticate problem using ICAP server X-Git-Tag: SQUID_4_0_14~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=940307b92200ba8bd02d95a5f9a01aa019d85ad1;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 6b25ea1a76..b89bf8e9b4 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -1359,8 +1359,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(Http::HdrType::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(Http::HdrType::PROXY_AUTHENTICATE); + } reply->header.removeHopByHopEntries(); diff --git a/src/client_side_request.h b/src/client_side_request.h index c037cf867a..639d71f59b 100644 --- a/src/client_side_request.h +++ b/src/client_side_request.h @@ -148,6 +148,7 @@ public: public: void startAdaptation(const Adaptation::ServiceGroupPointer &g); + bool requestSatisfactionMode() const { return request_satisfaction_mode; } private: /// Handles an adaptation client request failure.