Hi, After paying more attention to my logs, I realized that it's still not working. I got tricked by the fact that the post iterator is run during it's destruction.
In my application I see hat the MHD_post_process is called with upload_data_size=4 (which is 'arg=') but the post iterator callback function is never called from within the library. Then after the reply is sent and the MHD_destroy_post_processor is called, the post iterator callback is invoked (and here I got tricked previously thinking that it's working). Regards, Ovidiu Sas On Wed, Feb 6, 2013 at 11:08 AM, Ovidiu Sas <[email protected]> wrote: > Hmm ..., I checked the archive before posting but it seems that I > missed that report. > Anyway, I tested the new release and everything seems to be working fine. > > Thanks, > Ovidiu > > On Tue, Feb 5, 2013 at 7:53 PM, Christian Grothoff <[email protected]> > wrote: >> Dear Ovidiu, >> >> The issue was discussed on this list a few days ago and fixed Feb 1st. >> >> I've now released GNU libextractor 0.9.25 with the fix. >> >> >> Happy hacking! >> >> Christian >> >> On 02/05/2013 10:31 PM, Ovidiu Sas wrote: >>> Hello all, >>> >>> I'm trying to use the library to handle simple POST requests. >>> During the implementation, I discovered an issue: if the post request >>> has one single key with no value, the MHD_PostDataIterator is not >>> invoked. >>> Here's an example of such post: >>> POST /mi/core/uptime HTTP/1.1. >>> Host: 192.168.2.60. >>> User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 >>> Firefox/18.0. >>> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8. >>> Accept-Language: en-US,en;q=0.5. >>> Accept-Encoding: gzip, deflate. >>> DNT: 1. >>> Referer: http://192.168.2.60/mi/core/uptime. >>> Connection: keep-alive. >>> Content-Type: application/x-www-form-urlencoded. >>> Content-Length: 4. >>> . >>> arg= >>> >>> The following post request is properly processed (MHD_PostDataIterator >>> is invoked): >>> POST /mi/core/uptime HTTP/1.1. >>> Host: 192.168.2.60. >>> User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 >>> Firefox/18.0. >>> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8. >>> Accept-Language: en-US,en;q=0.5. >>> Accept-Encoding: gzip, deflate. >>> DNT: 1. >>> Referer: http://192.168.2.60/mi/core/uptime. >>> Connection: keep-alive. >>> Content-Type: application/x-www-form-urlencoded. >>> Content-Length: 8. >>> . >>> arg=blah >>> >>> >>> I am using the library in single threaded mode (MHD_NO_FLAG) with select. >>> The version that I tested is 0.9.24. >>> The library is integrated into the opensips project and it is handling >>> GET requests. >>> http://opensips.svn.sourceforge.net/viewvc/opensips/trunk/modules/httpd/ >>> I am looking to add POST request handling. >>> >>> I haven't check the libmicrohttpd source code yet ... just wanted to >>> know first if this is a known issue. >>> >>> >>> Regards, >>> Ovidiu Sas
