Closed svoinea closed 6 years ago
The Safari browser fails to load videos from hatrac.
hatrac
The curl request sent is something like:
curl
curl 'https://dev.rebuildingakidney.org/hatrac/resources/immunofluorescence/videos/2017/352970ba8928bde2353ef6437899cf3f' \ -XGET \ -H 'Referer: https://www.google.com/' \ -H 'Range: bytes=22478848-22578762' \ -H 'Host: dev.rebuildingakidney.org' \ -H 'Accept: /' \ -H 'Connection: keep-alive' \ -H 'Accept-Language: en-us' \ -H 'Accept-Encoding: identity' \ -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Safari/604.1.38' \ -H 'Cookie: webauthn_track=490fd837.55a9a0c8617c1' \ -H 'X-Playback-Session-Id: 191DF680-492A-4567-B456-47EA78ECEEA9'
for which the response header looks like:
HTTP/1.1 206 Partial Content Date: Mon, 09 Oct 2017 22:03:24 GMT Server: Apache/2.4.27 (Fedora) OpenSSL/1.0.2k-fips mod_wsgi/4.5.15 Python/2.7 WWW-Authenticate: Webauthn: preauth=https://dev.rebuildingakidney.org/authn/preauth?referrer=/hatrac/resources/immunofluorescence/videos/2017/352970ba8928bde2353ef6437899cf3f Vary: Host,cookie,User-Agent Upgrade: h2 Connection: Upgrade, Keep-Alive Content-Range: bytes 22478848-22578762/22578763 Content-Length: 99915 Content-Location: /hatrac/resources/immunofluorescence/videos/2017/352970ba8928bde2353ef6437899cf3f:TDTXMBLZPBZDDHN3NZF2OSBZAM ETag: "TDTXMBLZPBZDDHN3NZF2OSBZAM" Keep-Alive: timeout=5, max=100 Content-Type: text/plain; charset=UTF-8
For chunk responses, hatrac does not set the Content-Type, and the default gets in that case Content-Type: text/plain; charset=UTF-8.
Content-Type
Content-Type: text/plain; charset=UTF-8
I checked curl with the Range header for a video static file, and it returns Content-Type: video/mp4.
Range
Content-Type: video/mp4
A fix for this is pushed to master. Please confirm that it works for you. @svoinea
Tested on Safari and it works as expected.
The Safari browser fails to load videos from
hatrac
.The
curl
request sent is something like:for which the response header looks like:
For chunk responses,
hatrac
does not set theContent-Type
, and the default gets in that caseContent-Type: text/plain; charset=UTF-8
.I checked
curl
with theRange
header for a video static file, and it returnsContent-Type: video/mp4
.