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 09:47:25 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.10) Gecko/20121027 Icedove/10.0.10

On 11/18/2012 01:21 AM, Helin Wang wrote:
Hi Christian,

Thanks for your response.
I did more tests, seems post processor can be created but won't be called
if I did not specify encoding. post processor can't be created if I use
GET. Event more, with GET (curl -d 'data' -G), *upload_data_size will
always be 0.
Anyway, as you said, parse myself should be the best solution. I am using
it, with POST (*upload_data_size will always be 0 with GET). So I found my
way, thanks:)

Well, parsing the data yourself or not is clearly secondary here; by switching to POST you now at least do *get* some data (and now you can decide how to parse it).

Hi Christian, and everyone,

There is another issue blocking me now.
I am using threading model MHD_USE_SELECT_INTERNALLY, if I sleep 3s in the
answer function.

There's already your problem: you are not "allowed" to block in the answer function if you use MHD_USE_SELECT_INTERNALLY as the threading model. Then we have 1 thread, and you blocking it will have seriously bad consequences. If you want to do blocking operations like that, you should use the one-thread-per-connection model.

Happy hacking!

Christian



reply via email to

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