|
From: | Helin Wang |
Subject: | Re: [libmicrohttpd] MHD_create_post_processor failed for a GET request with body |
Date: | Sun, 18 Nov 2012 01:10:01 -0800 |
On 11/18/2012 01:21 AM, Helin Wang wrote: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,
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:)
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.
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.
Happy hacking!
Christian
[Prev in Thread] | Current Thread | [Next in Thread] |