Replies: 3 comments
-
So the client is definitely sending a |
Beta Was this translation helpful? Give feedback.
-
Yes, that's right. I also implemented a HEAD endpoint. It was never called. I tested it with the latest versions of Chrome, Safari, and Firefox. You can also recreate this with this test video. |
Beta Was this translation helpful? Give feedback.
-
I spent an unreasonable amount of time researching this and found no answers in the standards. But here are some things I would try:
Also, compare the behavior of different browsers, because sometimes there are clues hidden there. Good luck! If you find something that works, do share it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
We provide an MP4 file for download via a Quarkus endpoint. This MP4 file comes from an S3 server that we use via the Minio extension. We receive an InputStream from the Minio library. We return this with a RestResponse.
However, when this GET endpoint is called, current browsers only read the headers and not the body, because the “Accept-Ranges: bytes” header is sent along with it. The browser then starts a new call with a “Range: bytes=x-y” header.
The problem is that with the current implementation, the entire InputStream is read and written using the transferTo method on the first call, even though the web server never reads it. And if the video file is 500MB, for example, this causes a relatively large amount of network and CPU overhead for nothing.
Is there any way to make this more efficient?
Example:
Beta Was this translation helpful? Give feedback.
All reactions