[PATCH] httprepo: long arguments support (issue2126)

Matt Mackall mpm at selenic.com
Mon Mar 28 10:51:28 CDT 2011


Ok, folks, let's try and bring some focus back to this.

First, the problem:

- we have commands that want to send more than a URL's worth of data per
request (discovery)
- we have other commands that MUST send more than a URL's worth (pull)

Second, the constraints:

- we have a number of existing users that are filtering auth based on
GET/POST

Third, the ground rules:

- we CANNOT break the hgweb configuration of existing users

This is non-negotiable. Configuring hgweb with auth is probably the
hardest piece of getting hg going and often involves lots of crying and
hair-pulling. Inducing more of that after they've gotten everything
working is just not acceptable.


Folks, this basically rules out any solution involving POST. Period.
No special config options, no automatic GET/POST selection based on
length (not only does this still break users, but does so in a way
that's completely impossible to debug!).


Fortunately, HTTP already has a standard way to send additional data
with GET requests that should be compatible with all existing users,
it's called "cookies". 

IIS reportedly accepts a default of 16k of headers, with each cookie
being up to ~4k.

Apache defaults to cookies of up to ~8k each, and up to 100 header
lines.

So I think we should conservatively be able to break a large request up
into a series of 1k cookies that will be accepted by basically any
server.


-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list