As a user I want to be able to made HTTP Range Requests to the server for large byte data that is persisted in the NATS object store. The official Go std lib offers a method http.ServeContent which is recommended over io.Copy as it:
handles Range requests properly, sets the MIME type, and handles If-Match, If-Unmodified-Since, If-None-Match, If-Modified-Since, and If-Range requests.
This requires the content to have the Seek which currently the ObjectResult does not therefore it can't yet benefit from this standard method
Use case
Partial requests for large data can be useful for streaming large content like video. This gives the client (assuming web client) greater flexibility with caching downloads, efficiency with parallel requests to name a few.
Contribution
If I learn that this could be possible, I would be keen to contribute.
Proposed change
As a user I want to be able to made HTTP Range Requests to the server for large byte data that is persisted in the NATS object store. The official Go std lib offers a method http.ServeContent which is recommended over
io.Copy
as it:This requires the content to have the
Seek
which currently theObjectResult
does not therefore it can't yet benefit from this standard methodUse case
Partial requests for large data can be useful for streaming large content like video. This gives the client (assuming web client) greater flexibility with caching downloads, efficiency with parallel requests to name a few.
Contribution
If I learn that this could be possible, I would be keen to contribute.