0

I'm trying to play a growing audio file on my website and I don't know how Apache should be configured for this task. I read that I need to send a status code 206 (Partial Content). This is done by Apache automatically. In detail, my current response looks like this:

HTTP/1.1 206 Partial Content
Date: Sun, 25 Oct 2015 20:01:00 GMT
Server: Apache/2.4.7 (Ubuntu)
Last-Modified: Sun, 25 Oct 2015 20:01:00 GMT
ETag: W/"fa4e-522f34dc6d95e"
Accept-Ranges: bytes
Content-Length: 64078
Content-Range: bytes 0-64077/64078
Keep-Alive: timeout=5, max=93
Connection: Keep-Alive
Content-Type: audio/x-wav

As I understand this, Apache considers this response nonetheless as complete, as can be seen by

Content-Range: bytes 0-64077/64078

I also read, that it should be possible to assign a unknown total length like this:

Content-Range: bytes 0-64077/*

I tried to enforce this via mod_headers, but it didn't change the actual header:

Header edit Content-Range ^(.*)/[0-9]+$ $1/*

So I think I want to teach Apache to consider my current file only as a small part of an unknown amount of data. But maybe I'm completely on the wrong track. So what would do I need to do to make it work?

  • Not really a true answer, but have you considered Nginx instead? Many big streaming providers use Nginx, it offers also many extensions in this field like: github.com/arut/nginx-rtmp-module – JayMcTee Oct 25 '15 at 21:21
  • @JayMcTee thanks, but unfortunately I am limited to Apache (for now). – basilikum Oct 25 '15 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.