[PATCH RFC] hgweb: add config option for maxhttpheadersize

Matt Mackall mpm at selenic.com
Tue May 3 21:26:04 CDT 2011


On Tue, 2011-05-03 at 19:19 -0500, Augie Fackler wrote:
> On May 3, 2011, at 7:14 PM, Augie Fackler wrote:
> > 
> > On May 3, 2011, at 3:47 PM, Sune Foldager wrote:
> >> 
> >> Does this look good to you? Setting it to 0, the new arguments-in-headers
> >> option can then be disabled, for debug or other purposes.
> >> 
> >> -Sune
> >> 
> >> # HG changeset patch
> >> # User Sune Foldager <cryo at cyanite.org>
> >> # Date 1304455295 -7200
> >> # Node ID 254b8682218b8257b3d25b23b6fb2b806ca5fd07
> >> # Parent  fa2b596db18201408981e82ef7f9625a838e3ec9
> >> hgweb: add config option for maxhttpheadersize
> >> 
> >> diff -r fa2b596db182 -r 254b8682218b mercurial/wireproto.py
> >> --- a/mercurial/wireproto.py	Tue May 03 22:28:08 2011 +0200
> >> +++ b/mercurial/wireproto.py	Tue May 03 22:41:35 2011 +0200
> >> @@ -233,7 +233,9 @@
> >>        else:
> >>            caps.append('streamreqs=%s' % ','.join(requiredformats))
> >>    caps.append('unbundle=%s' % ','.join(changegroupmod.bundlepriority))
> >> -    caps.append('httpheader=1024')
> >> +    maxsize = repo.ui.configint('server', 'maxhttpheadersize', 1024,
> >> +                                untrusted=True)
> >> +    caps.append('httpheader=%d' % maxsize)
> > 
> > This is nice, but what about making the client only drop into headers for args if the total arg length would be longer than some amount?
> > 
> > (That's what I meant to propose in my last mail on this topic, maybe I was unclear.)
> 
> D'oh, just saw (and properly parsed) mpm's message about wanting it to
> be thoroughly tested. Matt, does that mean we can get cleaner
> GET-based arguments back sometime in the future for short argstrings?

That wasn't my plan, no. Most people never look at these things. The
very few who want to look at them for debugging can turn on this option.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list