1
0
mirror of synced 2025-04-20 11:47:43 +03:00

Fixed build error.

This commit is contained in:
yhirose 2012-10-03 23:50:23 -04:00
parent e0a25745cf
commit 17bf14a2f7

View File

@ -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());