libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] queueing requests


From: Christian Grothoff
Subject: Re: [libmicrohttpd] queueing requests
Date: Wed, 19 Sep 2012 20:18:18 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120724 Lightning/1.0b1 Icedove/3.0.11

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]