Mercurial > hg-stable
changeset 36806:7574c8173d5e
wireprotoserver: check if command available before calling it
The previous behavior was just plain wrong. I have no clue how it
landed. My guess is a merge conflict resolution gone wrong on my
end a few weeks ago.
Differential Revision: https://phab.mercurial-scm.org/D2716
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 06 Mar 2018 15:02:53 -0800 |
parents | d4c760c997cd |
children | c638a13093cf |
files | mercurial/wireprotoserver.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/wireprotoserver.py Tue Mar 06 02:43:17 2018 -0600 +++ b/mercurial/wireprotoserver.py Tue Mar 06 15:02:53 2018 -0800 @@ -235,14 +235,14 @@ for chunk in gen: yield chunk - rsp = wireproto.dispatch(repo, proto, cmd) - if not wireproto.commands.commandavailable(cmd, proto): req.respond(HTTP_OK, HGERRTYPE, body=_('requested wire protocol command is not available ' 'over HTTP')) return [] + rsp = wireproto.dispatch(repo, proto, cmd) + if isinstance(rsp, bytes): req.respond(HTTP_OK, HGTYPE, body=rsp) return []