]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3110: reply_body_max_size none dont work with x-forwarded-for
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 4 Dec 2010 16:28:02 +0000 (09:28 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 4 Dec 2010 16:28:02 +0000 (09:28 -0700)
src/HttpReply.cc

index 984e09e938bc89c6c03d4d5283b92cd2582ab848..5dd4eb748fa20cf6f3201ae5f1a7aae987eee39b 100644 (file)
@@ -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) {