I'm trying to stream audio files, which requires the request to support partial response by specifying the "Range: " header.
Partial request should already be supported by Cloudflare, and it works for Github (rawcdn.githack.com
, gistcdn.githack.com
). However I found that both Bitbucket (bbcdn.githack.com
) and Gitlab (glcdn.githack.com
) does not support partial response.
In this case Content-Type doesn't matter, it still works if the content-type is application/octet-stream
instead of audio/x-m4a
, as long as partial request is supported.
Is that an intentional behaviour or configuration problem?
Test for Github CDN, which returns 206 Partial Content:
curl --header 'Range: bytes=0-10' -v -o /dev/null 'https://gistcdn.githack.com/arcnavier/725bc575222fe8e9931618c2d5b6580f/raw/Lovely%20Day%20-%20Most%20Beautiful%20Anime%20Music%20%281%20Hour%20BGM%29.m4a'
Trying 104.31.95.240...
* TCP_NODELAY set
* Connected to gistcdn.githack.com (104.31.95.240) port 443 (#0)
...
< HTTP/2 206
< date: Thu, 19 Apr 2018 13:17:43 GMT
< content-type: application/octet-stream
< content-length: 11
...
< cf-cache-status: HIT
< content-range: bytes 0-10/57847658
< server: cloudflare
<
{ [11 bytes data]
Test for Gitlab CDN, returns 200 with the entire content
curl --header 'Range: bytes=0-10' -v -o /dev/null 'https://glcdn.githack.com/maomihz/bigmusic/raw/master/2 Hour Beautiful Piano Music - Romantic Love Song 【BGM】.m4a'
Trying 104.31.94.240...
* TCP_NODELAY set
* Connected to glcdn.githack.com (104.31.94.240) port 443 (#0)
...
< HTTP/2 200
< date: Thu, 19 Apr 2018 13:17:23 GMT
< content-type: application/octet-stream
< content-length: 114571793
...
< cf-cache-status: HIT
< server: cloudflare
< cf-ray: 40dfa6afbec5586d-DFW
<
{ [783 bytes data]
Bitbucket, returns 200
curl --header 'Range: bytes=0-10' -v -o /dev/null 'https://bbcdn.githack.com/pypy/pypy/raw/51718fe91a11a641de8dfd2e54a7df4876ceca20/get_externals.py'
Trying 104.31.94.240...
* TCP_NODELAY set
* Connected to bbcdn.githack.com (104.31.94.240) port 443 (#0)
< HTTP/2 200
< date: Thu, 19 Apr 2018 13:33:45 GMT
< content-type: text/plain
Thank you for your effort!