[Koha-bugs] [Bug 4855] Tools/Export does not tell browser file size

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Aug 22 05:47:44 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4855

David Cook <dcook at prosentient.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcook at prosentient.com.au

--- Comment #3 from David Cook <dcook at prosentient.com.au> ---
Yeah, this is a tough one.

As Andreas suggests, it's impossible to output the Content-Length unless it
fetches the entire data dump first, and then sends it out. For a large
database, you're not going to be able to do that in RAM, so you're going to
need to use a temporary file. 

The tools/export.pl is actually problematic in general (see Bug 26791). If we
wanted to use a temporary file instead of streaming out the response record by
record, then we'd be best off using a BackgroundJob to prepare the file
(although then you have potential issues with disk space for large data dumps). 

(For a large file it would be more efficient to have Apache httpd serve it as a
static file than for Starman, but then you wouldn't have authentication and
authorization protecting the file if you serve it using Apache httpd. So we'd
probably still use Starman, but we'd need to make sure it was using either a
CGI script or a Mojolicious controller and not Plack since CGI::Emulate::PSGI
buffers the entire HTTP response before sending it out)

But it's something on my mind 😅

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list