-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.2.4
-
Component/s: None
-
Environment:nodejs, no mongoose, no transpiling
-
Empty show more show less
Hi,
I'm using mongodb's node.js driver in my project for streaming GridFS multimedia files on the browser.
I've notice that from version 3.2.4 to the actual (3.2.7) there is probably an issue in the openDownloadStream function passing start and end parameters.
As you maybe know the browser (Safari, Chrome) ask con content range request so, from express is necessay to respond with 206 and provide information about the actual streamed content and use res.write(chunk).
It seems that from the 3.2.4 version there is an issue in the end of file write from the openDownloadStream function.
Below the output with 3.2.3 driver version in chunked file stream (the file is 25588946 bytes size)
headers bytes=0-1
headers bytes=0-65535
headers bytes=65535-25588945
from 3.2.4 version the output is this
headers bytes=0-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
headers bytes=25588945-
the latest byte of the file and the file play freeze
Please let me know if is something wrong from me or if you need further info
Best regards
Enrico