[cgiapp] Using HTTP chunked transfer with CGI::App?

Des Herriott des.herriott at gmail.com
Fri Jun 18 09:40:06 EDT 2010


Hi,

I'm working on a CGI::Application app which needs to run some potentially
slow tasks, and I want to keep the user updated about its progress.
The runmodes I'm using:

- show_request_form - display the initial request form
- show_preview - once the user has entered their data, display
 a list of the work that will be done
- submit_request - carry out the actual work

The submit_request runmode will run several tasks, some of which could
be quite slow.  The overall run time of this runmode could be 20-30
seconds, so I want to keep the user updated after each task is completed.
It seems like HTTP chunked transfer is what I need here, but I'm having
trouble understanding how to make it work with CGI::App.  Since CGI::App
runmodes basically constructs the entire page and return it, I can't see
a way to return one chunk of the page at a time.

Am I missing something, is there perhaps a useful a plugin to
progressively render some output, or is this just not going to work?

Thanks,

-- 
Des Herriott
des.herriott at gmail.com


More information about the cgiapp mailing list