# HG changeset patch # User Marcin Kuzminski # Date 2017-04-17 23:36:36 # Node ID 38f01b35f39dc633521e5af414852f6f87af5b7e # Parent b0f7b2ca92a8b1b06ba824e168deffdb58039a5d git-lfs: report chunked encoding support properly to the client. - this allows streaming support of ANY binaries. diff --git a/vcsserver/git_lfs/lib.py b/vcsserver/git_lfs/lib.py --- a/vcsserver/git_lfs/lib.py +++ b/vcsserver/git_lfs/lib.py @@ -88,9 +88,10 @@ class OidHandler(object): log.debug('LFS: skipping further action as oid is existing') return response, has_errors + chunked = ("Transfer-Encoding", "chunked") upload_action = OrderedDict( href=self.obj_href, - header=OrderedDict([("Authorization", self.get_auth())]) + header=OrderedDict([("Authorization", self.get_auth()), chunked]) ) if not has_errors: response = OrderedDict(upload=upload_action) diff --git a/vcsserver/git_lfs/tests/test_lfs_app.py b/vcsserver/git_lfs/tests/test_lfs_app.py --- a/vcsserver/git_lfs/tests/test_lfs_app.py +++ b/vcsserver/git_lfs/tests/test_lfs_app.py @@ -142,7 +142,8 @@ class TestLFSApplication(object): {u'authenticated': True, u'actions': { u'upload': { - u'header': {u'Authorization': u'Basic XXXXX'}, + u'header': {u'Authorization': u'Basic XXXXX', + u'Transfer-Encoding': u'chunked'}, u'href': u'http://localhost/repo/info/lfs/objects/123'}, u'verify': { u'header': {u'Authorization': u'Basic XXXXX'},