httprepo: send 100-continue on POSTs if using http2
authorAugie Fackler <durin42@gmail.com>
Mon, 02 May 2011 12:10:50 -0500
changeset 14245 13d44e4235f8
parent 14244 e7525a555a64
child 14246 f1f4abdd5074
httprepo: send 100-continue on POSTs if using http2
mercurial/httprepo.py
--- 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