[PATCH 5 of 5 RFC] httprepo: send 100-continue on POSTs if using http2
Augie Fackler
durin42 at gmail.com
Thu May 5 13:35:43 CDT 2011
# HG changeset patch
# User Augie Fackler <durin42 at gmail.com>
# Date 1304356250 18000
# Node ID 3897e0a5bc033bbf8214477f3313d2827d7a56db
# Parent 1e533203663e316ce2b01a781d981c4a3518132b
httprepo: send 100-continue on POSTs if using http2
diff --git a/mercurial/httprepo.py b/mercurial/httprepo.py
--- a/mercurial/httprepo.py
+++ b/mercurial/httprepo.py
@@ -75,6 +75,10 @@
args['data'] = ''
data = args.pop('data', None)
headers = args.pop('headers', {})
+
+ if data and self.ui.configbool('ui', 'http2', False):
+ headers['Expect'] = '100-Continue'
+
self.ui.debug("sending %s command\n" % cmd)
q = [('cmd', cmd)]
headersize = 0
More information about the Mercurial-devel
mailing list