diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt --- a/mercurial/help/config.txt +++ b/mercurial/help/config.txt @@ -1291,6 +1291,10 @@ Controls generic server settings. checking that all new file revisions specified in manifests are present. Default is False. +``maxhttpheaderlen`` + Instruct HTTP clients not to send request headers longer than this + many bytes. Default is 1024. + ``smtp`` -------- diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py --- a/mercurial/wireproto.py +++ b/mercurial/wireproto.py @@ -624,7 +624,8 @@ def _capabilities(repo, proto): capsblob = bundle2.encodecaps(bundle2.getrepocaps(repo)) caps.append('bundle2=' + urllib.quote(capsblob)) caps.append('unbundle=%s' % ','.join(changegroupmod.bundlepriority)) - caps.append('httpheader=1024') + caps.append( + 'httpheader=%d' % repo.ui.configint('server', 'maxhttpheaderlen', 1024)) return caps # If you are writing an extension and consider wrapping this function. Wrap