From b9f5f9f6534a42efe9daad371d41349e45c9b304 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sat, 4 Dec 2010 09:28:02 -0700 Subject: [PATCH] Bug 3110: reply_body_max_size none dont work with x-forwarded-for --- src/HttpReply.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) { -- 2.47.2