in reply to Serving video files in specific byte-ranges

This is a common problem.

You should have used HTTP authentication from the beginning. Go with HTTP's strengths, not against it.

You're probably logging in user with forms and cookies instead. If you want to keep that system, make up URLs to the video for each user, perhaps set it up so that such a URL expires after a while. Use an internal redirect and let your Web server deal with the static file, it knows how to deal with ranges/requests for partial content. The xsendfile extension helps you with that and exist for Apache httpd, nginx and lighttpd. You can then throw your Perl code away.

  • Comment on Re: Serving video files in specific byte-ranges