]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/ActionParams.cc
2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 /* DEBUG: section 16 Cache Manager API */
12 #include "base/TextException.h"
13 #include "ipc/TypedMsgHdr.h"
14 #include "mgr/ActionParams.h"
15 #include "sbuf/StringConvert.h"
17 Mgr::ActionParams::ActionParams(): httpMethod(Http::METHOD_NONE
)
21 Mgr::ActionParams::ActionParams(const Ipc::TypedMsgHdr
&msg
)
23 msg
.getString(httpUri
);
26 msg
.getString(method
);
27 httpMethod
.HttpRequestMethodXXX(method
.termedBuf());
29 msg
.getPod(httpFlags
);
30 msg
.getString(httpOrigin
);
32 msg
.getString(actionName
);
33 msg
.getString(userName
);
34 msg
.getString(password
);
35 queryParams
.unpack(msg
);
39 Mgr::ActionParams::pack(Ipc::TypedMsgHdr
&msg
) const
41 msg
.putString(httpUri
);
42 auto foo
= SBufToString(httpMethod
.image());
44 msg
.putPod(httpFlags
);
45 msg
.putString(httpOrigin
);
47 msg
.putString(actionName
);
48 msg
.putString(userName
);
49 msg
.putString(password
);
50 queryParams
.pack(msg
);