configitems: register the 'server.maxhttpheaderlen' config
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 30 Jun 2017 03:44:11 +0200
changeset 33224 ab9121fda8d2
parent 33223 d227451ee280
child 33225 90a1b62bdc91
configitems: register the 'server.maxhttpheaderlen' config
mercurial/configitems.py
mercurial/wireproto.py
--- a/mercurial/configitems.py	Fri Jun 30 03:44:10 2017 +0200
+++ b/mercurial/configitems.py	Fri Jun 30 03:44:11 2017 +0200
@@ -128,6 +128,9 @@
 coreconfigitem('server', 'disablefullbundle',
     default=False,
 )
+coreconfigitem('server', 'maxhttpheaderlen',
+    default=1024,
+)
 coreconfigitem('ui', 'clonebundleprefers',
     default=list,
 )
--- a/mercurial/wireproto.py	Fri Jun 30 03:44:10 2017 +0200
+++ b/mercurial/wireproto.py	Fri Jun 30 03:44:11 2017 +0200
@@ -771,7 +771,7 @@
 
     if proto.name == 'http':
         caps.append('httpheader=%d' %
-                    repo.ui.configint('server', 'maxhttpheaderlen', 1024))
+                    repo.ui.configint('server', 'maxhttpheaderlen'))
         if repo.ui.configbool('experimental', 'httppostargs', False):
             caps.append('httppostargs')