From: Amos Jeffries Date: Fri, 27 Jan 2012 12:28:26 +0000 (-0700) Subject: Restor mgr: default menu display X-Git-Tag: BumpSslServerFirst.take05~12^2~69 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f9c6f861baac3f62cbb46e12f32269bb1f31e27c;p=thirdparty%2Fsquid.git Restor mgr: default menu display --- diff --git a/src/cache_manager.cc b/src/cache_manager.cc index b45cf50c2e..0be3b44e3a 100644 --- a/src/cache_manager.cc +++ b/src/cache_manager.cc @@ -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