]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix cachemgr http_port config report hiding options
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 19 Nov 2010 12:04:58 +0000 (01:04 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 19 Nov 2010 12:04:58 +0000 (01:04 +1300)
src/cache_cf.cc

index 71fde205ef55f4d4e468f71307d1cd133537d204..4f51f752dc8db04a43054fe2ec7a790c06ef6ce7 100644 (file)
@@ -3752,23 +3752,47 @@ dump_generic_http_port(StoreEntry * e, const char *n, const http_port_list * s)
                       n,
                       s->s.ToURL(buf,MAX_IPSTRLEN));
 
+    // MODES and specific sub-options.
     if (s->intercepted)
         storeAppendPrintf(e, " intercept");
 
-    if (s->spoof_client_ip)
+    else if (s->spoof_client_ip)
         storeAppendPrintf(e, " tproxy");
 
-    if (s->accel)
+    else if (s->accel) {
         storeAppendPrintf(e, " accel");
 
-    if (s->vhost)
-        storeAppendPrintf(e, " vhost");
+        if (s->vhost)
+            storeAppendPrintf(e, " vhost");
 
-    if (s->vport)
-        storeAppendPrintf(e, " vport");
+        if (s->vport < 0)
+            storeAppendPrintf(e, " vport");
+        else if (s->vport > 0)
+            storeAppendPrintf(e, " vport=%d", s->vport);
 
-    if (s->defaultsite)
-        storeAppendPrintf(e, " defaultsite=%s", s->defaultsite);
+        if (s->defaultsite)
+            storeAppendPrintf(e, " defaultsite=%s", s->defaultsite);
+
+        if (s->protocol && strcmp(s->protocol,"http") != 0)
+            storeAppendPrintf(e, " protocol=%s", s->protocol);
+
+        if (s->allow_direct)
+            storeAppendPrintf(e, " allow-direct");
+
+        if (s->ignore_cc)
+            storeAppendPrintf(e, " ignore-cc");
+
+    }
+
+    // Generic independent options
+
+    if (s->name)
+        storeAppendPrintf(e, " name=%s", s->name);
+
+#if !USE_HTTP_VIOLATIONS
+    if (!s->accel && s->ignore_cc)
+        storeAppendPrintf(e, " ignore-cc");
+#endif
 
     if (s->connection_auth_disabled)
         storeAppendPrintf(e, " connection-auth=off");
@@ -3786,6 +3810,9 @@ dump_generic_http_port(StoreEntry * e, const char *n, const http_port_list * s)
         storeAppendPrintf(e, " disable-pmtu-discovery=%s", pmtu);
     }
 
+    if (s->s.IsAnyAddr() && !s->s.IsIPv6())
+        storeAppendPrintf(e, " ipv4");
+
     if (s->tcp_keepalive.enabled) {
         if (s->tcp_keepalive.idle || s->tcp_keepalive.interval || s->tcp_keepalive.timeout) {
             storeAppendPrintf(e, " tcpkeepalive=%d,%d,%d", s->tcp_keepalive.idle, s->tcp_keepalive.interval, s->tcp_keepalive.timeout);
@@ -3796,7 +3823,7 @@ dump_generic_http_port(StoreEntry * e, const char *n, const http_port_list * s)
 
 #if USE_SSL
     if (s->sslBump)
-        storeAppendPrintf(e, " sslBump");
+        storeAppendPrintf(e, " ssl-bump");
 
     if (s->cert)
         storeAppendPrintf(e, " cert=%s", s->cert);