libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Problems receiving POST data.


From: Pawel Veselov
Subject: Re: [libmicrohttpd] Problems receiving POST data.
Date: Wed, 14 May 2014 03:43:06 -0700


/me shamefully found http://lists.gnu.org/archive/html/libmicrohttpd/2012-04/msg00002.html

Is it then generally safe to assume that with "POST" method, I can always reply with MHD_YES, expecting that access handler will be called again, or do I need to check for crazy agents that may post with a 0 content-length?

Thank you!

On Wed, May 14, 2014 at 3:31 AM, Pawel Veselov <address@hidden> wrote:
Hi.

I just started using libmicrohttpd, and can't quite figure out the POST data.
The request headers are:

POST /r/43/0 HTTP/1.1
Host: druid:1182
Content-Range: bytes 0-18085/18086
Content-Type: image/png
Content-Length: 18086

and the body is correctly present (checked in wireshark)

In my access handler, I print out:
DBG("HTTP %s %s, %d bytes, %p", 
    method, url, *upload_data_size, upload_data);
DBG("post data cnt : %d\n", 
    MHD_get_connection_values(conn, MHD_POSTDATA_KIND, 0, 0));

Everything is 0, the *upload_data_size, upload_data ptr, 
and count of MHD_POSTDATA connection values. The access handler
is only called once.

MHD_VERSION is 0x00091600

Any help with what I'm missing, or where to poke, will be greatly appreciated.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]