How to serve a growing file

Alles, was den Apache betrifft, kann hier besprochen werden.

How to serve a growing file

Postby basilikum » 29. October 2015 15:35

I would like to serve a growing audio file to the browser. The file is written to the disk during a live talk. After that talk, this is just another static file and I have no problems. But during the talk I would like to be able to play the file in a browser and continuously play, as it gets bigger. It should also be possible to seek to a certain position. The problem is, once the file is served, it is served with the length that it had at that time. So I cannot play the parts there were not available yet when I first loaded the file, but are available now.

One I thought it should be possible is to change the "Content-Rage" header from something like this:
Code: Select all
Content-Range: bytes 0-31999/32000

to something like this:
Code: Select all
Content-Range: bytes 0-31999/9999999999

This way the browser is supposed to thinks that there is always more data to request. I don't know if that is in general a good idea or not but it was the only thing I could come up with. But anyway, trying to change with mod_headers didn't work. So how can I achieve this?
Posts: 1
Joined: 29. October 2015 15:24
Operating System: Ubuntu 14.04

Return to Apache

Who is online

Users browsing this forum: No registered users and 3 guests