Search code examples
cgihiawatha

Hiawatha CGI: writing to the client as soon as a command gets executed


I have a CGI script run by Hiawatha web server that needs to

  1. return some data to the client,
  2. do some system work (may take 20-30 seconds)
  3. and then return yet more data.

So far I haven't been able to achieve this result: the script doesn't write data as the commands get executed, rather, it writes everything in a single shot when its execution ends. Is it even possible to achieve with Hiawatha what I described above? Thank you.


Solution

  • I figured it out: you need to set the WaitForCGI = yes option in the config file.