Re-use Request, instead of re-create. Add asan target.

This commit is contained in:
flamingcow
2019-05-07 22:56:00 -07:00
parent c571e47bae
commit a4171b0ae1
9 changed files with 37 additions and 24 deletions

View File

@@ -10,7 +10,7 @@ int main(int argc, char *argv[]) {
google::InitGoogleLogging(argv[0]);
gflags::ParseCommandLineFlags(&argc, &argv, true);
firecgi::Server server(FLAGS_port, [](std::unique_ptr<firecgi::Request> request) {
firecgi::Server server(FLAGS_port, [](firecgi::Request* request) {
request->WriteHeader("Content-Type", "text/plain");
request->WriteBody("Hello world");
request->End();