libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] MHD_create_post_processor failed for a GET request w


From: Christian Grothoff
Subject: Re: [libmicrohttpd] MHD_create_post_processor failed for a GET request with body
Date: Sun, 18 Nov 2012 00:58:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.10) Gecko/20121027 Icedove/10.0.10

Dear Helin,

Sending data with a GET request is, eh, unusual. Have you considered using PUT? In any case, I suspect it should kind-of work nevertheless (but of course I didn't try this). The PostProcessor not working is most likely because it didn't understand your data encoding. You can either manipulate the connection headers on the server side to tell it, or --- especially as your GET-with-data is likely non-standard in many ways --- just parse 'upload_data' yourself! You don't need a PostProcessor to access upload data (just make sure you set *upload_data_size to 0 if you're done, and expect it to arrive possibly incrementally).

If you need further help, it would likely be useful if you could post exactly what you're sending to the HTTP server and also what your HTTP GET handler code looks like.

Happy hacking!

Christian

On 11/17/2012 10:30 PM, Helin Wang wrote:
Hi,

I am sending a HTTP body to microhttpd with GET, I did not use POST because
this request will not change my server state, so I want to stick to GET's
implication.

But MHD_create_post_processor returned null for this request. I know this
is reasonable, because it is a post processor rather than a get processor.

Is there any walk around?

Many thanks,
Harry





reply via email to

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