I am developing a video image processing tool in the CGI ruby and want to redirect the user to another place after clicking the start-ffmpeg-for-hour-long-encoding-spree button.
Here is the code:
@cgi.out("status" => "302", "location" => @job.report_url) {''}
@cgi.out{''}
@job.start
Doing this works fine with Safari 5.0.5. But Firefox waits for the script to complete its work before redirecting. And, if your script takes longer than completing the Apache timeout, this may never happen.
I was hoping for the kinf of the cgi.close () method. What exists! But this is the CGI :: Session method, and I have nothing to do.
Here is another similar question ... But not a duplicate! Since I need to use stdin, stdout and stderr after , redirection: Returning a response using Ruby CGI before the script is complete?
So, how can I send the full CGI response before , performing some other tasks with the same script?
source
share