Correctly handle range requests from video players
> If girder is asked for the whole file (Range 0-), then it responds with a 200.  Reading https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests, we probably should still send a 206.
diff --git a/girder/utility/abstract_assetstore_adapter.py b/girder/utility/abstract_assetstore_adapter.py
index 5d904c2f5..f63aea165 100644
--- a/girder/utility/abstract_assetstore_adapter.py
+++ b/girder/utility/abstract_assetstore_adapter.py
@@ -3,6 +3,7 @@ import os
 import re
 import six
 
+import cherrypy
 from cherrypy._cpreqbody import Part
 
 from girder.api.rest import setResponseHeader, setContentDisposition
@@ -327,13 +328,14 @@ class AbstractAssetstoreAdapter(object):
             be set to 'attachment; filename=$filename'.
         :type contentDisposition: str or None
         """
+        isRangeRequest = cherrypy.request.headers.get('Range')
         setResponseHeader(
             'Content-Type',
             file.get('mimeType') or 'application/octet-stream')
         setContentDisposition(file['name'], contentDisposition or 'attachment')
         setResponseHeader('Content-Length', max(endByte - offset, 0))
 
-        if (offset or endByte < file['size']) and file['size']:
+        if (offset or endByte < file['size'] or isRangeRequest) and file['size']:
             setResponseHeader(
                 'Content-Range',
                 'bytes %d-%d/%d' % (offset, endByte - 1, file['size']))
diff --git a/test/test_file.py b/test/test_file.py
index 710dcf07c..4ec5323ab 100644
--- a/test/test_file.py
+++ b/test/test_file.py
@@ -1,6 +1,9 @@
 from girder.models.file import File
 from girder.models.folder import Folder
 from girder.models.upload import Upload
+import pytest
+from pytest_girder.assertions import assertStatus
+from pytest_girder.utils import uploadFile
 from six import BytesIO
 
 
@@ -9,3 +12,22 @@ def testEmptyUploadFromFile(admin, fsAssetstore):
     file = Upload().uploadFromFile(BytesIO(b''), size=0, name='empty', parent=dest, user=admin)
     assert File().load(file['_id'], force=True) is not None
     assert file['assetstoreId'] == fsAssetstore['_id']
+
+
+@pytest.mark.parametrize('range,status,cr,cl', (
+    ('bytes=0-', 206, 'bytes 0-99/100', 100),
+    ('bytes=0-10', 206, 'bytes 0-10/100', 11),
+    (None, 200, None, 100)
+))
+def testRangeRequestBehavior(range, status, cr, cl, admin, server, fsAssetstore):
+    dest = Folder().childFolders(admin, parentType='user')[0]
+    file = uploadFile('test', b'a' * 100, admin, dest)
+    headers = [('Range', range)] if range else []
+    resp = server.request(
+        path='/file/%s/download' % file['_id'], user=admin, additionalHeaders=headers, isJson=False)
+    assertStatus(resp, status)
+    assert resp.headers['Content-Length'] == cl
+    if cr is None:
+        assert 'Content-Range' not in resp.headers
+    else:
+        assert resp.headers['Content-Range'] == cr
['test/test_file.py', 'girder/utility/abstract_assetstore_adapter.py']