[PATCH 1 of 1] sshserver: add varargs capability

Augie Fackler lists at durin42.com
Wed Feb 10 10:04:02 CST 2010


On Wed, Feb 10, 2010 at 8:45 AM, Sune Foldager <cryo at cyanite.org> wrote:
> I made some more updates to
> http://mercurial.selenic.com/wiki/WireProtocolUnificationPlan
> recently.
>
> We're going to need server capabilities to make any changes in the wire
> protocol both for ssh (adding flexible arguments) and http (adding oob
> error stream).

Having just implemented chunked transfer encoding, I'm confident we
can't tuck extra information into the chunk headers at the http level.
When we read from the http response object, we're totally oblivious of
the presence of chunked transfers.

Perhaps we should make a spot in stream proto 2 for some OOB data?
just some key-value pairs or something in the chunk header, and old
clients can ignore things they don't know.

> My initial patch dealt with ssh in a simple way (no JSON
> or similar) and called the capability 'varargs'. We may want to go with
> a different name instead, such as a protocol version number; maybe
> "v1.1" or whatever system we can come up with.
>
> I realize http already transmits something like that back, although I am
> not sure it's actually meant to be a version number.

I'm pretty sure that's a protocol version, so we can use that.

> Due to the
> stateless nature, we need to send it with all commands, OR the server
> needs to be able to figure out the version from the command sent. This
> is the case for my ssh patch; the server can see the difference.

http already does this in a header, see do_cmd in httprepo

>
> /Sune
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>


More information about the Mercurial-devel mailing list