Reputation: 133
I have a cgi script that runs perfectly on my mac server. It sends out varied outputs just like any cgi script should. My problem however, is that sometimes I need the cgi script to run a long task before quitting. The problem with this however is that the browser then has to wait the long time before it sees the output. Is there any way to say "this script is not sending any more output" to apache and have it send it out while still allowing the cgi to finish its tasks in the background?
a general outline of my code is:
script outputs various possible outputs based on query string
script usually ends
Upvotes: 0
Views: 542
Reputation: 11
I don't now what you want to get, but probably you need to disable deflate module. This module compressing page before send it to browser, so your script must be done. If disabled, then script's output will be printed dynamicly
Upvotes: 1
Reputation: 10460
Send the long task to a jobs queue.
echo "your long task" | at now
Upvotes: 0