]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/mgr/Inquirer.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / mgr / Inquirer.cc
index 294c0045c53b6407ee6d8dde23aa102b635b1ee6..9eb412dea68a646828d329b3ef1381c825f9d528 100644 (file)
@@ -1,33 +1,30 @@
 /*
- * $Id$
- *
  * DEBUG: section 16    Cache Manager API
  *
  */
 
 #include "squid.h"
 #include "base/TextException.h"
+#include "comm.h"
 #include "comm/Connection.h"
 #include "comm/Write.h"
 #include "CommCalls.h"
+#include "errorpage.h"
 #include "HttpReply.h"
 #include "HttpRequest.h"
 #include "ipc/UdsOp.h"
 #include "mgr/ActionWriter.h"
-#include "mgr/IntParam.h"
-#include "mgr/Inquirer.h"
 #include "mgr/Command.h"
+#include "mgr/Inquirer.h"
+#include "mgr/IntParam.h"
 #include "mgr/Request.h"
 #include "mgr/Response.h"
 #include "SquidTime.h"
-#include "errorpage.h"
 #include <memory>
 #include <algorithm>
 
-
 CBDATA_NAMESPACED_CLASS_INIT(Mgr, Inquirer);
 
-
 Mgr::Inquirer::Inquirer(Action::Pointer anAction,
                         const Request &aCause, const Ipc::StrandCoords &coords):
         Ipc::Inquirer(aCause.clone(), applyQueryParams(coords, aCause.params.queryParams), anAction->atomic() ? 10 : 100),
@@ -79,7 +76,7 @@ Mgr::Inquirer::start()
         LOCAL_ARRAY(char, url, MAX_URL);
         snprintf(url, MAX_URL, "%s", aggrAction->command().params.httpUri.termedBuf());
         HttpRequest *req = HttpRequest::CreateFromUrl(url);
-        ErrorState err(ERR_INVALID_URL, HTTP_NOT_FOUND, req);
+        ErrorState err(ERR_INVALID_URL, Http::scNotFound, req);
 #if HAVE_UNIQUE_PTR
         std::unique_ptr<HttpReply> reply(err.BuildHttpReply());
 #else
@@ -92,7 +89,7 @@ Mgr::Inquirer::start()
 #else
         std::auto_ptr<HttpReply> reply(new HttpReply);
 #endif
-        reply->setHeaders(HTTP_OK, NULL, "text/plain", -1, squid_curtime, squid_curtime);
+        reply->setHeaders(Http::scOkay, NULL, "text/plain", -1, squid_curtime, squid_curtime);
         reply->header.putStr(HDR_CONNECTION, "close"); // until we chunk response
         replyBuf.reset(reply->pack());
     }