pallets / quart

An async Python micro framework for building web applications.
https://quart.palletsprojects.com
MIT License
3.01k stars 164 forks source link

Support Accept-Range header in send_file? #349

Open EternityForest opened 5 months ago

EternityForest commented 5 months ago

It would be nice to have an accept_range flag on the semd_file, that would set the accept header, and check for range requests in the context.

It seems easy enough to implement so I can write the feature and do a PR if this is in-scope for the project.

In very simple one off apps, it would be nice to be able to serve seekable media without needing to add an extra ASGi server to handle the static file serving.

Right now this doesn't seem to work in browsers without range requests enabled.

Also, non-resumable downloads are generally annoying.