|
From: | Nicholas Cooper |
Subject: | [libmicrohttpd] MHD_AccessHandlerCallback won't be called again if *upload_data_size is set to non-zero. |
Date: | Thu, 14 Jul 2016 12:34:52 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:25.8) Gecko/20160108 FossaMail/25.2.0 |
Hi,Let's say the access handler callback passed to MHD_start_daemon() is answer_to_connection(). According to the comment in microhttpd.h, the parameter upload_data_size shall be updated to the number of bytes not processed. However, it seems that it only works perfectly if the *upload_data_size is updated to zero. If its value is set to non-zero, answer_to_connection() won't be called again, which leaves the HTTP client waiting forever. To be more exact, unless the client sends another (unrelated) request, MHD calls answer_to_connection() for the suspending request again. Don't know if this is a bug, or I'm misusing MHD. Having tried this on both Linux (Debian) and Windows, and both don't work. The attached file demonstrates the problem.
Thanks. Have a nice day. Nicholas Cooper.
a.cpp
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |