Browse Source

Fixed problem with log format in server examples

yhirose 7 years ago
parent
commit
9546ec842b
2 changed files with 2 additions and 2 deletions
  1. 1 1
      example/server.cc
  2. 1 1
      example/simplesvr.cc

+ 1 - 1
example/server.cc

@@ -35,7 +35,7 @@ std::string log(const Request& req, const Response& res)
 
     s += "================================\n";
 
-    snprintf(buf, sizeof(buf), "%s %s %s", req.method.c_str(), req.path.c_str(), req.version.c_str());
+    snprintf(buf, sizeof(buf), "%s %s %s", req.method.c_str(), req.version.c_str(), req.path.c_str());
     s += buf;
 
     std::string query;

+ 1 - 1
example/simplesvr.cc

@@ -67,7 +67,7 @@ string log(const Request& req, const Response& res)
 
     s += "================================\n";
 
-    snprintf(buf, sizeof(buf), "%s %s %s", req.method.c_str(), req.path.c_str(), req.version.c_str());
+    snprintf(buf, sizeof(buf), "%s %s %s", req.method.c_str(), req.version.c_str(), req.path.c_str());
     s += buf;
 
     string query;