]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat Enforcement
authorAutomatic source maintenance <squidadm@squid-cache.org>
Fri, 22 Jan 2010 01:13:11 +0000 (18:13 -0700)
committerAutomatic source maintenance <squidadm@squid-cache.org>
Fri, 22 Jan 2010 01:13:11 +0000 (18:13 -0700)
src/adaptation/icap/ModXact.cc
src/client_side_request.cc

index 83ae9eef69767fcbcb095832f986a6ca040b5288..bddee51219b60c2e667bd3d2d8c539deb8daff8b 100644 (file)
@@ -1249,17 +1249,16 @@ void Adaptation::Icap::ModXact::makeRequestHeaders(MemBuf &buf)
             virginBodySending.plan();
     }
 
-    if (TheConfig.send_client_ip && request)
-    {
+    if (TheConfig.send_client_ip && request) {
         IpAddress client_addr;
 #if FOLLOW_X_FORWARDED_FOR
-       if (TheConfig.icap_uses_indirect_client) {
-           client_addr = request->indirect_client_addr;
-       } else
+        if (TheConfig.icap_uses_indirect_client) {
+            client_addr = request->indirect_client_addr;
+        } else
 #endif
-       client_addr = request->client_addr;
-       if(!client_addr.IsAnyAddr() && !client_addr.IsNoAddr())
-           buf.Printf("X-Client-IP: %s\r\n", client_addr.NtoA(ntoabuf,MAX_IPSTRLEN));
+            client_addr = request->client_addr;
+        if (!client_addr.IsAnyAddr() && !client_addr.IsNoAddr())
+            buf.Printf("X-Client-IP: %s\r\n", client_addr.NtoA(ntoabuf,MAX_IPSTRLEN));
     }
 
     if (TheConfig.send_client_username && request)
index ca57cdefaab6d9b194256f4917beda4be1d50ba5..ad090efcae70f058d7c7f87d4df6531d0d5ff199 100644 (file)
@@ -399,13 +399,13 @@ ClientRequestContext::httpStateIsValid()
 
 #if FOLLOW_X_FORWARDED_FOR
 /**
- * clientFollowXForwardedForCheck() checks the content of X-Forwarded-For: 
+ * clientFollowXForwardedForCheck() checks the content of X-Forwarded-For:
  * against the followXFF ACL, or cleans up and passes control to
  * clientAccessCheck().
  *
  * The trust model here is a little ambiguous. So to clarify the logic:
  * - we may always use the direct client address as the client IP.
- * - these trust tests merey tell whether we trust given IP enough to believe the 
+ * - these trust tests merey tell whether we trust given IP enough to believe the
  *   IP string which it appended to the X-Forwarded-For: header.
  * - if at any point we don't trust what an IP adds we stop looking.
  * - at that point the current contents of indirect_client_addr are the value set