From: Amos Jeffries Date: Tue, 23 Nov 2010 00:32:53 +0000 (+1300) Subject: Bug 3110: reply_body_max_size none dont work with x-forwarded-for X-Git-Tag: take1~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a46fd5ead45624e406053297c27bace0ae1b297;p=thirdparty%2Fsquid.git Bug 3110: reply_body_max_size none dont work with x-forwarded-for --- diff --git a/src/HttpReply.cc b/src/HttpReply.cc index 7e039a8260..ac088509bf 100644 --- a/src/HttpReply.cc +++ b/src/HttpReply.cc @@ -590,7 +590,12 @@ HttpReply::calcMaxBodySize(HttpRequest& request) bodySizeMax = -1; ACLFilledChecklist ch(NULL, &request, NULL); - ch.src_addr = request.client_addr; +#if FOLLOW_X_FORWARDED_FOR + if (Config.onoff.acl_uses_indirect_client) + ch.src_addr = request.indirect_client_addr; + else +#endif + ch.src_addr = request.client_addr; ch.my_addr = request.my_addr; ch.reply = HTTPMSGLOCK(this); // XXX: this lock makes method non-const for (acl_size_t *l = Config.ReplyBodySize; l; l = l -> next) {