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