replace invalid characters instead of crashing
While logging the requests.
This commit is contained in:
parent
3ff27d30e3
commit
41bb71bde7
1 changed files with 2 additions and 1 deletions
|
@ -995,7 +995,8 @@ int main(int argc, char **argv)
|
|||
{ "request", req.body },
|
||||
{ "response", res.body },
|
||||
};
|
||||
fprintf(stdout, "http_request: %s\n", log.dump().c_str());
|
||||
fprintf(stdout, "http_request: %s\n",
|
||||
log.dump(-1, ' ', false, json::error_handler_t::replace).c_str());
|
||||
});
|
||||
|
||||
svr.set_exception_handler([](const Request &, Response &res, std::exception_ptr ep) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue