libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] requests without Content-Length HTTP header


From: Ken Zangelin
Subject: Re: [libmicrohttpd] requests without Content-Length HTTP header
Date: Fri, 31 Jan 2014 12:37:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Hi again!

So, if I understand this correctly, my server will have to demand either the
'Content-Length' or the 'Transfer-Encoding' header in any incoming request.

I was hoping I could accept requests without any length detail at all.
Something like, if after a timeout of X milliseconds, the incoming package
is considered complete, or even better, let the MHD client inform the MHD 
library
that the incoming package is complete - passing it the payload as it comes in.

Right now with my tests without any of these two headers (PUT and POST) I get 
no payload at all in the callback function.
I'm guessing MHD treats this case at 'Content-Length: 0'.

Any interest in implementing something like this?

Thanks for the quick reply!

/Ken Z

On 31/01/14 12:12, Christian Grothoff wrote:
Hi!

This is not a known limitation, it should be possible to receive POST/PUT
requests of unknown size / without length header.  Note that in this case,
the client must use 'chunked' encoding for the upload (but MHD will strip
the encoding, so you as the application will still only get the payload
without the chunking).


Happy hacking!

Christian

On 01/31/2014 09:51 AM, Ken Zangelin wrote:
Hi there,

I use MHD for a REST server and I'm experiencing problems to receive the
payload for incoming requests that have no Content-Length HTTP header.
Is this a known 'limitation' of MHD or is it me doing something wrong?

Thank you,

/Ken Z


________________________________

Este mensaje se dirige exclusivamente a su destinatario. Puede consultar
nuestra política de envío y recepción de correo electrónico en el enlace
situado más abajo.
This message is intended exclusively for its addressee. We only send and
receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx



________________________________

Este mensaje se dirige exclusivamente a su destinatario. Puede consultar 
nuestra política de envío y recepción de correo electrónico en el enlace 
situado más abajo.
This message is intended exclusively for its addressee. We only send and 
receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx



reply via email to

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