rack-gridfs
rack-gridfs copied to clipboard
Content-Length header is missing
Please give more background on the case where you observe this. If an enumerable object (which includes something that acts like a File
) is given, we stream the response with chunked encoding, which does not supply Content-Length
by definition. This is common behavior in Rack components and is probably sensible/desirable for most GridFS use cases.
However -- not looking closely at the implementation, but -- we could certainly make it possible to explicitly override Transfer-Encoding
to not use chunked if expressly desired, if we're not allowing for that already. Patches welcome if you need that :wink:
I'm using rack-grids to serve video files that is cached by nginx (proxy cache). The problem is that it won't play on iOS because there is a requirement for byte range request.
After further reading, I read that nginx does byte range request automatically for static file and requires content-length header.
Is there a better way to serve videos from GridFS that also supports iOS devices? I'm developing a simple CMS (https://github.com/steverandy/concen) that keep all the files on GridFS for simplicity.