Add an optional argument to HttpServerResponse.sendFile() that indicates whether the response should be ended.
Currently, sendFile always ends the response. This prevents sending data from more than one file.
This would be similar in nature to Pipe.endOnComplete().
This option would be also be available on the sendFile(filename, offset) and sendFile(filename, offset, length) variants as well, so partial files could also be sent.
Use case: We have an S3 storage service where multipart objects are stored in multiple files. We can send single part S3 objects with sendFile. But, when sending multipart objects (ranges), we must compose Pipe futures with endOnComplete(false), which does not take advantage of the zero-copy IO features of Linux.
I would not be able to contribute, but would be able to test the feature.
Thanks!
Add an optional argument to
HttpServerResponse.sendFile()that indicates whether the response should be ended.Currently,
sendFilealways ends the response. This prevents sending data from more than one file.This would be similar in nature to
Pipe.endOnComplete().This option would be also be available on the
sendFile(filename, offset)andsendFile(filename, offset, length)variants as well, so partial files could also be sent.Use case: We have an S3 storage service where multipart objects are stored in multiple files. We can send single part S3 objects with
sendFile. But, when sending multipart objects (ranges), we must composePipefutures withendOnComplete(false), which does not take advantage of the zero-copy IO features of Linux.I would not be able to contribute, but would be able to test the feature.
Thanks!