libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] queueing requests


From: Eivind Sarto
Subject: Re: [libmicrohttpd] queueing requests
Date: Wed, 19 Sep 2012 16:42:03 -0400

Thanks.
Great.
With GET/HEAD will keep-alive work, too?
-eivind
________________________________________
From: address@hidden address@hidden On Behalf Of Christian Grothoff 
address@hidden
Sent: Wednesday, September 19, 2012 11:18 AM
To: libmicrohttpd development and user mailinglist
Subject: Re: [libmicrohttpd] queueing requests

On 09/19/2012 07:54 PM, Eivind Sarto wrote:
> Hi,
>
> Most (all?) of the examples in libmicrohttpd will queue the response from the 
> second call to the client handler.
>
> If you already know that you want to respond with an error during the initial 
> call to the client handler (client context ptr == NULL),
> would it be appropriate to queue the reply immediately?

Yes.

> What would be the ramifications of queueing an error response immediately?

That MHD does not send "100 CONTINUE" if the protocol is HTTP/1.1 and
the client asked for 100 CONTINUE.  So if you queue the error message
immediately (during PUT/POST), you avoid the traffic upload from the client.

For GET/HEAD requests, it makes no difference whatsoever (you can even
queue 200 OK instantly without complications).

Happy hacking!

Christian




reply via email to

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