]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/mgr/ActionParams.cc
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / mgr / ActionParams.cc
index 2b7705e615cc27ea61d6965855bf92fee5793a56..8444ec3050954186310ddb05e45be56374b91fd5 100644 (file)
@@ -1,12 +1,18 @@
 /*
- * DEBUG: section 16    Cache Manager API
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
  *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
+/* DEBUG: section 16    Cache Manager API */
+
 #include "squid.h"
 #include "base/TextException.h"
 #include "ipc/TypedMsgHdr.h"
 #include "mgr/ActionParams.h"
+#include "sbuf/StringConvert.h"
 
 Mgr::ActionParams::ActionParams(): httpMethod(Http::METHOD_NONE)
 {
@@ -18,7 +24,7 @@ Mgr::ActionParams::ActionParams(const Ipc::TypedMsgHdr &msg)
 
     String method;
     msg.getString(method);
-    httpMethod = HttpRequestMethod(method.termedBuf(), NULL);
+    httpMethod.HttpRequestMethodXXX(method.termedBuf());
 
     msg.getPod(httpFlags);
     msg.getString(httpOrigin);
@@ -33,7 +39,7 @@ void
 Mgr::ActionParams::pack(Ipc::TypedMsgHdr &msg) const
 {
     msg.putString(httpUri);
-    String foo(httpMethod.image().toString());
+    auto foo = SBufToString(httpMethod.image());
     msg.putString(foo);
     msg.putPod(httpFlags);
     msg.putString(httpOrigin);
@@ -43,3 +49,4 @@ Mgr::ActionParams::pack(Ipc::TypedMsgHdr &msg) const
     msg.putString(password);
     queryParams.pack(msg);
 }
+