Browse Source

Fixed build error.

yhirose 13 years ago
parent
commit
17bf14a2f7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      example/server.cc

+ 2 - 2
example/server.cc

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