]> 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>
Tue, 23 Nov 2010 00:32:53 +0000 (13:32 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 23 Nov 2010 00:32:53 +0000 (13:32 +1300)
src/HttpReply.cc

index 7e039a82606f7e42f96641680e9c9377b86a25e0..ac088509bfe9fb835f494b4f5ed1f160ba0b5733 100644 (file)
@@ -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) {