mercurial/httppeer.py
changeset 17221 988974c2a4bf
parent 17192 1ac628cd7113
child 18696 d23f61b6617f
child 18737 56f8522c3591
equal deleted inserted replaced
17220:bdac214a4705 17221:988974c2a4bf
    77         if util.safehasattr(data, 'length'):
    77         if util.safehasattr(data, 'length'):
    78             size = data.length
    78             size = data.length
    79         elif data is not None:
    79         elif data is not None:
    80             size = len(data)
    80             size = len(data)
    81         headers = args.pop('headers', {})
    81         headers = args.pop('headers', {})
       
    82         if data is not None and 'Content-Type' not in headers:
       
    83             headers['Content-Type'] = 'application/mercurial-0.1'
       
    84 
    82 
    85 
    83         if size and self.ui.configbool('ui', 'usehttp2', False):
    86         if size and self.ui.configbool('ui', 'usehttp2', False):
    84             headers['Expect'] = '100-Continue'
    87             headers['Expect'] = '100-Continue'
    85             headers['X-HgHttp2'] = '1'
    88             headers['X-HgHttp2'] = '1'
    86 
    89