I've been doing some more testing and it seems to work really well.
Serving up big files quite happily, and fast!
A few additional thoughts...
The PSGI spec allows 2 useful options:
1) The subref callback as originally suggested
2) Return a filehandle and the server hadles the streaming
On 10/12/2012 09:06 AM, Mike Tonks wrote:
I've been doing some more testing and it seems to work really well.
Serving up big files quite happily, and fast!
A few additional thoughts...
The PSGI spec allows 2 useful options:
1) The subref callback as originally suggested
2) Return a
Hi Mark,
Thanks for the feedback. OK I'll have a go then.
Here's my initial attempts...
https://github.com/miketonks/CGI--Application
https://github.com/miketonks/CGI-Application-Plugin-Stream
Does this approach seem ok?
mike
On 5 October 2012 14:03, Mark Stosberg m...@summersault.com
For years I've used the handy CAP::Stream
return $self-stream_file( $file );
method and this does a lovely job of chunking the data so large files
are handled without memory issues. Files could be anything from 10Mb
up to 800Mb ish.
I'm now looking to go 'production' with a PSGI, Starman
This is as far as I've got. Can anyone help / advise? Maybe patching
CAP::Stream is the way to go - I suppose it should be possible to
detect the running environment and 'do the right thing'.
Mike,
My reading of the spec is that you can return a callback instead of a
body, and the Plack