mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 01:08:27 +00:00
Fixed build error.
This commit is contained in:
parent
e0a25745cf
commit
17bf14a2f7
1 changed files with 2 additions and 2 deletions
|
@ -40,10 +40,10 @@ std::string log(const httplib::Connection& c)
|
|||
s += buf;
|
||||
|
||||
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;
|
||||
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;
|
||||
}
|
||||
snprintf(buf, sizeof(buf), "%s\n", query.c_str());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue