]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 5162: mgr:index URL do not produce MGR_INDEX template (#1191)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Thu, 1 Dec 2022 18:50:37 +0000 (18:50 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Wed, 7 Dec 2022 12:59:44 +0000 (01:59 +1300)
Satisfy mgr:index requests using

* a 200 OK response with a body derived from the MGR_INDEX template (if
  that template file was found during (re)configuration) or
* a 404 (Not Found) error response (otherwise).

Broken in 2019 commit 7e6eabb, when Squid started replying using a 200
OK response with a hard-coded "mgr_index" text as a body, ignoring any
configured MGR_INDEX template.

src/errorpage.cc

index 6fbedbe1dba3dd35ca47b99c54f6ea19f4ae412e..f74e6e554e222c322f08c6289646aa958cbd7e4f 100644 (file)
@@ -154,6 +154,7 @@ static const struct {
     const char *text;
 }
 
+/// error messages that cannot be configured/customized externally
 error_hard_text[] = {
 
     {
@@ -180,10 +181,6 @@ error_hard_text[] = {
     {
         ERR_REQUEST_START_TIMEOUT,
         "request start timedout"
-    },
-    {
-        MGR_INDEX,
-        "mgr_index"
     }
 };