Submitter | adgar@google.com |
---|---|
Date | June 29, 2015, 11:39 p.m. |
Message ID | <e1df28c4853698574526.1435621172@adgar.nyc.corp.google.com> |
Download | mbox | patch |
Permalink | /patch/9820/ |
State | Accepted |
Headers | show |
Comments
On Mon, 2015-06-29 at 19:39 -0400, Mike Edgar wrote: > # HG changeset patch > # User Mike Edgar <adgar@google.com> > # Date 1435595731 14400 > # Mon Jun 29 12:35:31 2015 -0400 > # Node ID e1df28c4853698574526ab1024e6eace85dd86c1 > # Parent ff5172c830022b64cc5bd1bae36b2276e9dc6e5d > wireproto: add config knob for http header length limit Queued for default, thanks.
Patch
diff -r ff5172c83002 -r e1df28c48536 mercurial/help/config.txt --- a/mercurial/help/config.txt Wed Jun 24 13:41:27 2015 -0500 +++ b/mercurial/help/config.txt Mon Jun 29 12:35:31 2015 -0400 @@ -1291,6 +1291,10 @@ 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 -r ff5172c83002 -r e1df28c48536 mercurial/wireproto.py --- a/mercurial/wireproto.py Wed Jun 24 13:41:27 2015 -0500 +++ b/mercurial/wireproto.py Mon Jun 29 12:35:31 2015 -0400 @@ -624,7 +624,8 @@ 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