mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 01:08:27 +00:00
Made Response argument 'const'.
This commit is contained in:
parent
b5ae7d0e7a
commit
1b2f37e241
2 changed files with 6 additions and 5 deletions
|
@ -24,7 +24,7 @@ std::string dump_headers(const MultiMap& headers)
|
|||
return s;
|
||||
}
|
||||
|
||||
std::string log(const Request& req, Response& res)
|
||||
std::string log(const Request& req, const Response& res)
|
||||
{
|
||||
std::string s;
|
||||
char buf[BUFSIZ];
|
||||
|
@ -88,7 +88,7 @@ int main(void)
|
|||
res.set_content(buf, "text/html");
|
||||
});
|
||||
|
||||
svr.set_logger([](const Request& req, Response& res) {
|
||||
svr.set_logger([](const Request& req, const Response& res) {
|
||||
printf("%s", log(req, res).c_str());
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue