Re: [libmicrohttpd] Post request / upload_data / received request data packet

2015-06-24 Thread Ludovic Coralie
Sorry, but i don't understand. I try testing a rest websvice with jmeter or soap_ui. I send my request, for both of them, i send my request with on packet (not chunk). And when i received it in libmicrohttpd, there are some packet and i loose some datas. Sometimes, word or characters missing bet

Re: [libmicrohttpd] Post request / upload_data / received request data packet

2015-06-24 Thread Junker, Gregory
The problem is not MHD, it’s how the client sends the data. It may not all be in one transmission. The POST-handling example code explains how to handle POST data that does not all come in one TCP transmission: https://gnunet.org/svn/libmicrohttpd/src/examples/post_example.c In short, it is up

Re: [libmicrohttpd] "do never respond on first call"

2015-06-24 Thread Christian Grothoff
Hi! It's not a "strict" rule, in that you're in fact required to violate it if you want to give an error instead of '100 continue' to a POST request. Also, for everything but this PUT/POST case, you can queue a reply instantly . Just if you do so for POST, you (may) suppress '100 continue' which

[libmicrohttpd] "do never respond on first call"

2015-06-24 Thread Markus Doppelbauer
Hello, Most of the examples contain the comment: /* do never respond on first call */ Is this a strict rule? If not, what is the reason? Thanks a lot! Markus

[libmicrohttpd] Post request / upload_data / received request data packet

2015-06-24 Thread Ludovic Coralie
Hi, I'm new in libmicrohttpd and i need some advice: I try developp a light REST webserver and i test it with Jmter or soap_ui. When i send packet with http/1.1 protcol or http/1.0, always i received the data by packet and it loose some data between a packet and other packet. Here my code for

[libmicrohttpd] Post request / upload_data / received request one data packet

2015-06-24 Thread Ludovic Coralie
Hi, I'm new in libmicrohttpd and i need some advice: I try developp a light REST webserver and i test it with Jmter or soap_ui. When i send packet with http/1.1 protcol or http/1.0, always i received the data by packet and it loose some data between a packet and other packet. Here my code for

Re: [libmicrohttpd] "MHD_create_post_processor" returning NULL

2015-06-24 Thread Christian Grothoff
Yes, you do want to keep state across calls as the data will be given to you incrementally as it arrives over the network. You can use the "*con_cls" storage location to store connection-specific data. Some example code is here: http://www.git.taler.net/?p=mint.git;a=blob;f=src/mint/taler-mint-htt

Re: [libmicrohttpd] "MHD_create_post_processor" returning NULL

2015-06-24 Thread Christian Grothoff
Dear Harish, The PostProcessor only supports parsing certain encodings, and application/json is not among them. This is why you get NULL. So for this type of upload, your application has to do the parsing itself (or use a library like libjansson). Happy hacking! Christian On 06/24/2015 03:28 PM

[libmicrohttpd] HEAD and Keep-Alive Problems

2015-06-24 Thread Cristian KLEIN
Hello all, I am having some problems implementing HEAD requests in a way that keeps the connections alive. I am unsure how to properly implement HEAD requests, so as to send the client a correct "Content-Length" and not breaking keep-alive. I tried two options: (1) using MHD_create_response_from_