[PATCH 09 of 18] configitems: register the 'server.maxhttpheaderlen' config

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Jul 2 18:25:26 EDT 2017


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1498787051 -7200
#      Fri Jun 30 03:44:11 2017 +0200
# Node ID 08d1b1217b40e9c74f06e958a3dbfada01d65c8d
# Parent  ad4b02828f5f8702d7bd65a0c2b39b7f7a553524
# EXP-Topic config.register.server
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 08d1b1217b40
configitems: register the 'server.maxhttpheaderlen' config

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -122,6 +122,9 @@ coreconfigitem('server', 'concurrent-pus
 coreconfigitem('server', 'disablefullbundle',
     default=False,
 )
+coreconfigitem('server', 'maxhttpheaderlen',
+    default=1024,
+)
 coreconfigitem('ui', 'clonebundleprefers',
     default=list,
 )
diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -771,7 +771,7 @@ def _capabilities(repo, proto):
 
     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')
 


More information about the Mercurial-devel mailing list