[PATCH] httprepo: long arguments support (issue2126)

Matt Mackall mpm at selenic.com
Sun Mar 20 11:11:17 CDT 2011


On Sun, 2011-03-20 at 16:52 +0100, Dirkjan Ochtman wrote:
> On Sun, Mar 20, 2011 at 16:27, Matt Mackall <mpm at selenic.com> wrote:
> > 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.
> 
> Meh, I don't like it. I guess our protocol is already more RPC-like
> than REST-like, but I would rather strive to keep idempotent requests
> as GET and use POST only for the unbundle command.

The mirror of unbundle is changegroup and it obviously has exactly the
same request size issues. And it IS idempotent. And yes, we've gotten
dozens of reports of this being a problem from people try to clone with
a lot of heads on their repos.

We've already put in HTTP-specific hacks on some of the discovery
commands to split large requests into multiple commands, but that won't
work for changegroup.

> I'm also confused on what this is supposed to fix. The message
> mentions issue2126, but messages there seem to declare that we only
> have an actual problem (left) on unbundle, not on any of the GET
> commands. I guess the issue might be that we're trying to reduce the
> number of round trips needed because of an excessive list of heads?

Take a look at the discovery work that Peter is doing, where we bundle
multiple requests into one command. 

Fundamentally, any reasonable discovery protocol will want to do large
requests from client to server with very few round trips. And that's
just a bit outside the design envelope for HTTP GET.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list