Mercurial > public > mercurial-scm > hg-stable
diff mercurial/wireprotov2server.py @ 37653:b2fa1591fb44
wireproto: add media type to version 2 capabilities response
This is useful to advertise because servers reject unsupported
media types. A client may wish to speak multiple media types and
choose the one the server supports.
I doubt we'll ever use multiple media types or negotiation in core.
But during the course of developing this protocol, I may end up
making extensions that backport and forward port protocol support
as needed to support Mercurial deploys in the wild. e.g. I may
deploy support for an older protocol on a server so old clients
can continue using it.
It's worth pursuing changing the SSH protocol's upgrade mechanism
to support multiple media types as well...
Differential Revision: https://phab.mercurial-scm.org/D3299
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 13 Apr 2018 12:31:56 -0700 |
parents | 77c9ee77687c |
children | 23c4ddda7bbe |
line wrap: on
line diff
--- a/mercurial/wireprotov2server.py Fri Apr 13 12:31:34 2018 -0700 +++ b/mercurial/wireprotov2server.py Fri Apr 13 12:31:56 2018 -0700 @@ -385,6 +385,7 @@ caps = { 'commands': {}, 'compression': compression, + 'framingmediatypes': [FRAMINGTYPE], } for command, entry in wireproto.commandsv2.items():