When acting as a server, receiving a POST request with an empty body that takes a long time to respond.
BromideY opened this issue · comments
Bromide commented
Server code:
httplib::Server svr;
svr.Post("/hi", [](const httplib::Request &, httplib::Response &res) {
res.set_content("Hello World!", "text/plain");
});
svr.listen("0.0.0.0", 10001);
Then use curl to request:
curl -X POST localhost:10001/hi
Usually it will take 2s or 3s to respond ...
yhirose commented
Thanks for the feedback, but it's too little information. It seems like your network environment causes the problem.