lfs: add the 'Content-Type' header called out in the file transfer spec
authorMatt Harbison <matt_harbison@yahoo.com>
Sat, 24 Feb 2018 19:56:59 -0500
changeset 37243 3e293808e835
parent 37242 67db84842356
child 37244 3685a79ea51b
lfs: add the 'Content-Type' header called out in the file transfer spec https://github.com/git-lfs/git-lfs/blob/master/docs/api/basic-transfers.md#uploads
hgext/lfs/blobstore.py
--- a/hgext/lfs/blobstore.py	Sun Feb 25 23:44:02 2018 -0500
+++ b/hgext/lfs/blobstore.py	Sat Feb 24 19:56:59 2018 -0500
@@ -332,6 +332,7 @@
                                   hint=_('run hg verify'))
             request.data = filewithprogress(localstore.open(oid), None)
             request.get_method = lambda: 'PUT'
+            request.add_header('Content-Type', 'application/octet-stream')
 
         for k, v in headers:
             request.add_header(k, v)