laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.51k stars 11.02k forks source link

[FR] Response::stream wrapper with support for Range request header #5921

Closed ErikEklund closed 9 years ago

ErikEklund commented 10 years ago

Often when serving video or audio on a web site, you want to allow the visitor to scrub through the content. This is tricky to achieve through Laravel, as it requires support for the "Range" request header to properly seek to the correct position of a file stream before passing it along. Some form of wrapper function for Response::stream that could handle this would be a very useful addition to Laravels functionality.

GrahamCampbell commented 9 years ago

You can easily set headers on the response object returned from this method. Take a look at the source in symfony's repo.