mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 01:08:27 +00:00
Fixed unit test. Added URL encoding.
This commit is contained in:
parent
487ad28a17
commit
3b3828aaff
3 changed files with 353 additions and 58 deletions
|
@ -84,6 +84,10 @@ int main(void)
|
|||
c.response.set_content(dump_headers(c.request.headers), "text/plain");
|
||||
});
|
||||
|
||||
svr.get("/stop", [&](Connection& c) {
|
||||
svr.stop();
|
||||
});
|
||||
|
||||
svr.set_error_handler([](Connection& c) {
|
||||
const char* fmt = "<p>Error Status: <span style='color:red;'>%d</span></p>";
|
||||
char buf[BUFSIZ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue