libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] No call to MHD functions in MHD_AccessHandlerCallbac


From: Christian Grothoff
Subject: Re: [libmicrohttpd] No call to MHD functions in MHD_AccessHandlerCallback possible?
Date: Sun, 29 Jul 2012 20:22:46 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120613 Lightning/1.0b1 Icedove/3.0.11

On 07/29/2012 07:46 PM, Markus Becker wrote:
> Hi,
> 
> I was wondering whether it is possible to not call any MHD functions in my 
> MHD_AccessHandlerCallback function, but do that later? I am trying to 
> implement a proxy and have to fetch the data to return to the client from the 
> server first.
> 
> Did I miss something obvious? Could this be handled with 
> MHD_ContentReaderCallback?

Yes, but you'll still have to call MHD functions inside of the access
handler callback (MHD_queue_response).  Now, you don't have to do it
upon the first time the access handler is invoked; you can just return
MHD_YES and do it "some other time" (if you're using external select).
If you're using a thread per connection model, you can also just block
until you have at least the status code and response headers.

Happy hacking!

Christian



reply via email to

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