]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Restor mgr: default menu display
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 27 Jan 2012 12:28:26 +0000 (05:28 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 27 Jan 2012 12:28:26 +0000 (05:28 -0700)
src/cache_manager.cc

index b45cf50c2e2371ffc075ba737d1eb85594c6a5b6..0be3b44e3a636b42297d89edc9596e53744de188 100644 (file)
@@ -202,8 +202,12 @@ CacheManager::ParseUrl(const char *url)
     if (t < 1) {
         t = sscanf(url, "https://%[^/]/squid-internal-mgr/%[^?]%n?%s", host, request, &pos, params);
     }
-    if (t < 2)
-        xstrncpy(request, "index", MAX_URL);
+    if (t < 2) {
+        if (strncmp("cache_object://",url,15)==0)
+            xstrncpy(request, "menu", MAX_URL);
+        else
+            xstrncpy(request, "index", MAX_URL);
+    }
 
 #if _SQUID_OS2_
     if (t == 2 && request[0] == '\0') {
@@ -211,7 +215,10 @@ CacheManager::ParseUrl(const char *url)
          * emx's sscanf insists of returning 2 because it sets request
          * to null
          */
-        xstrncpy(request, "index", MAX_URL);
+        if (strncmp("cache_object://",url,15)==0)
+            xstrncpy(request, "menu", MAX_URL);
+        else
+            xstrncpy(request, "index", MAX_URL);
     }
 #endif