From: Amos Jeffries Date: Sat, 4 Dec 2010 16:28:02 +0000 (-0700) Subject: Bug 3110: reply_body_max_size none dont work with x-forwarded-for X-Git-Tag: SQUID_3_1_10~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9f5f9f6534a42efe9daad371d41349e45c9b304;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 984e09e938..5dd4eb748f 100644 --- a/src/HttpReply.cc +++ b/src/HttpReply.cc @@ -589,7 +589,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) {