Mercurial > hg
comparison mercurial/wireprototypes.py @ 37393:afcfdf53e4b5
wireproto: provide accessors for client capabilities
For HTTP, this refactors the existing logic, including the parsing of
the compression engine capability.
For SSH, this adds a ssh-only capability "protocaps" and a command for
informing the server on what the client supports. Since SSH is stateful,
keep track of the capabilities in the server instance.
Differential Revision: https://phab.mercurial-scm.org/D1944
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Sat, 24 Mar 2018 17:57:22 +0100 |
parents | 78103e4138b1 |
children | 2d965bfeb8f6 |
comparison
equal
deleted
inserted
replaced
37392:a4f02a17420d | 37393:afcfdf53e4b5 |
---|---|
115 def getargs(args): | 115 def getargs(args): |
116 """return the value for arguments in <args> | 116 """return the value for arguments in <args> |
117 | 117 |
118 returns a list of values (same order as <args>)""" | 118 returns a list of values (same order as <args>)""" |
119 | 119 |
120 def getprotocaps(): | |
121 """Returns the list of protocol-level capabilities of client | |
122 | |
123 Returns a list of capabilities as declared by the client for | |
124 the current request (or connection for stateful protocol handlers).""" | |
125 | |
120 def forwardpayload(fp): | 126 def forwardpayload(fp): |
121 """Read the raw payload and forward to a file. | 127 """Read the raw payload and forward to a file. |
122 | 128 |
123 The payload is read in full before the function returns. | 129 The payload is read in full before the function returns. |
124 """ | 130 """ |