Fixed build error.
This commit is contained in:
parent
e0a25745cf
commit
17bf14a2f7
@ -40,10 +40,10 @@ std::string log(const httplib::Connection& c)
|
|||||||
s += buf;
|
s += buf;
|
||||||
|
|
||||||
std::string query;
|
std::string query;
|
||||||
for (auto it = req.query.begin(); it != req.query.end(); ++it) {
|
for (auto it = req.params.begin(); it != req.params.end(); ++it) {
|
||||||
const auto& x = *it;
|
const auto& x = *it;
|
||||||
snprintf(buf, sizeof(buf), "%c%s=%s",
|
snprintf(buf, sizeof(buf), "%c%s=%s",
|
||||||
(it == req.query.begin()) ? '?' : '&', x.first.c_str(), x.second.c_str());
|
(it == req.params.begin()) ? '?' : '&', x.first.c_str(), x.second.c_str());
|
||||||
query += buf;
|
query += buf;
|
||||||
}
|
}
|
||||||
snprintf(buf, sizeof(buf), "%s\n", query.c_str());
|
snprintf(buf, sizeof(buf), "%s\n", query.c_str());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user