changeset 14245:13d44e4235f8

httprepo: send 100-continue on POSTs if using http2
author Augie Fackler <durin42@gmail.com>
date Mon, 02 May 2011 12:10:50 -0500
parents e7525a555a64
children f1f4abdd5074
files mercurial/httprepo.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/httprepo.py	Fri May 06 10:22:08 2011 -0500
+++ b/mercurial/httprepo.py	Mon May 02 12:10:50 2011 -0500
@@ -75,6 +75,10 @@
             args['data'] = ''
         data = args.pop('data', None)
         headers = args.pop('headers', {})
+
+        if data and self.ui.configbool('ui', 'usehttp2', False):
+            headers['Expect'] = '100-Continue'
+
         self.ui.debug("sending %s command\n" % cmd)
         q = [('cmd', cmd)]
         headersize = 0