[libmicrohttpd] call_connection_handler (connection); /* "final" call */ is called twice

2017-10-06 Thread Decebal Epuran
I am developing a web server that mainly handles POST requests (json). I'm getting the "final call" (*upload_data_size == 0) when all the POST data is transfered to my buffer and I'm ready to parse the json data and do additional work before send the reply. If I'm going over the timeout limit (MHD_

Re: [libmicrohttpd] call_connection_handler (connection); /* "final" call */ is called twice

2017-10-06 Thread Christian Grothoff
Well, I'm pretty sure there is nothing _wrong_ about your code. The MHD API doesn't actually specify whether it will call you one last time before the timeout, but what happens right now is that the timeout triggers the select() to unblock, and MHD goes over all "pending" connections, and _afterwar