0

I was playing around with apache and a chromecast with video, and as far as I can tell, the local video will only play on the chromecast if it gets a 200 response, rather than a 206 response.

Is it possible to configure apache (or suggest another web server) to respond to

range: bytes 0- 

with

200, OK

which is what chromecast appears to expect, rather than the partial content

206, Partial Content

Edit

This is not a duplicate of Is there a way of disabled byte-range requests in Apache?. I want to support partial-content, with the special case that if all the file is requested, then the response is 200 rather than 206.

The result of disabling responses, would give a 200 request as I require in my special case, but disable the ability to do resumable downloads or stream from the stored content.

mksteve
  • 101
  • 1
  • 4

1 Answers1

0

After some work with nodejs

code project : HTTP partial content in node-js. This allowed me to check response headers and results, and the chromecast did not care about the 200/206, but did care about CORS headers (google : chromecast).

Once I had added

 Header set Access-Control-Allow-Origin   "*"
 Header set Access-Control-Expose-Headers "Content-Type"
 Header set Access-Control-Expose-Headers "Accept-Encoding"
 Header set Access-Control-Expose-Headers "Range"

to my <Directory> then the chromecast started working with standard apache.

Review of apache code

I also did a review of apache code, and further checks by using a mis-spelled Header (Rnge rather than Range). The apache code is hard-wired to return 206, and has no mechanism I could find to override this.

mksteve
  • 101
  • 1
  • 4