Am 03.06.2016 um 15:51 schrieb Steffen Heil (Mailinglisten):
> NO. We want to stream the results to the client... It usually is
> several times bigger than the memory at hand.
I can think of three options right now:
* Know the content-length upfront (which you don't) - with that clients
could detect incomplete downloads.
* If you're in control of the application that processes the download,
tag some bytes to the end that clearly mark the file as valid (or
invalid) and check for these marker's presence or nonpresence before
processing the file
* Process a hash or signature during transmission (server side) and
store it - this way the file can be validated later and you only need to
store a small hash value on the server once the download has completed.

However, when you don't store the file temporarily, you also can't
continue the download after a network failure (e.g. after partial
download) - if that's not an issue for you: fine. If you're sending it
through a public network that might fail, you might want to be prepared
for such an event and be able to recover. I'd expect disk space (esp.
temporarily) to not be too prohibitive (you can start streaming while
you store the file to disk on the server)

Hope it helps,
Olaf


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to