equal
deleted
inserted
replaced
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 |