Andrew Gaul created JCLOUDS-284:
-----------------------------------
Summary: Use FileBackedOutputStream for non-repeatable InputStream
payloads
Key: JCLOUDS-284
URL: https://issues.apache.org/jira/browse/JCLOUDS-284
Project: jclouds
Issue Type: Improvement
Components: jclouds-blobstore
Affects Versions: 1.6.2, 1.7.0
Reporter: Andrew Gaul
Assignee: Andrew Gaul
Presently we call newByteArrayPayload(toByteArray(payload)) when payload is
non-repeatable. Instead, we should copy the payload to a
FileBackedOutputStream and wrap it in an InputStreamSupplierPayload. Note that
this requires lifetime management and calling FileBackedOutputStream.close to
remove the temporary file. This change would allow jclouds to limit its memory
use, avoiding denial of service situations, and support bigger streaming
payload by spooling them to disk. We also need to provide a property to
control the per-stream memory usage. Inspired by:
https://github.com/jclouds/jclouds-karaf/pull/23
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira