[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] MHD_PostDataIterator issue
From: |
Ovidiu Sas |
Subject: |
[libmicrohttpd] MHD_PostDataIterator issue |
Date: |
Tue, 5 Feb 2013 18:30:05 -0500 |
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
- [libmicrohttpd] MHD_PostDataIterator issue,
Ovidiu Sas <=