[PATCH] httprepo: long arguments support (issue2126)

Matt Mackall mpm at selenic.com
Sun Mar 20 20:39:37 CDT 2011


On Mon, 2011-03-21 at 09:15 +0800, Steven Brown wrote:
> On 20 March 2011 23:27, Matt Mackall <mpm at selenic.com> wrote:
> > On Sun, 2011-03-20 at 18:10 +0800, Steven Brown wrote:
> >> # HG changeset patch
> >> # User Steven Brown <StevenGBrown at gmail.com>
> >> # Date 1300614413 -28800
> >> # Node ID dd1002a1476d86eace9724ef04b502b724fc0525
> >> # Parent  48d606d7192b6f8f4fc8071fccdc5a83843ab2d3
> >> httprepo: long arguments support (issue2126)
> >>
> >> Send the command arguments in the HTTP request body. The command is still part
> >> of the URL. If the server does not have the 'longargs' capability, the client
> >> will send the command arguments in the URL as it did previously.
> >>
> >> When sending both command arguments and additional data in the same request,
> >> the client adds a 'datastart' field to the URL. The server uses this to
> >> determine where the command arguments end and the additional data begins.
> >
> > One of the reasons we were focusing on stashing stuff in headers is that
> > some folks might be relying on non-push requests being GETs in their web
> > server access rules. I'm not sure if this is a real problem, though.
> > Obviously, a POST approach is a lot cleaner.
> 
> Ahh, I see. I didn't realise there were any advantages to using the headers.
> 
> Perhaps long argument support should be off by default, with an option
> in the server's hgrc to turn it on? Then at least Mercurial would
> continue working after the upgrade in this case.

Let's try to get more discussion on whether POST is acceptable and
anyone is using POST filtering.

> Potential issues with using the headers:
> - Each web server would have a different header size, so it may be
> necessary to provide this header size in the hgrc. Putting the
> arguments in the body would require no configuration, except perhaps
> the on/off flag mentioned above.

I think we should be aiming for a one-size-fits-all-no-config solution.

> If the web servers in common use allow enough data in the headers, and
> we can make a reasonable assumption about the minimum header size,
> then these are non-issues. I'll need to do some research. Unless
> anyone on the list already knows?

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list