wireprotov2: remove support for sending bytes response
We recently declared that all responses must be CBOR. So remove
support for sending a type that isn't CBOR data.
Differential Revision: https://phab.mercurial-scm.org/D3387
--- a/mercurial/wireprotov2server.py Sat Apr 14 15:36:12 2018 -0700
+++ b/mercurial/wireprotov2server.py Sat Apr 14 15:38:11 2018 -0700
@@ -301,11 +301,7 @@
res.status = b'200 OK'
res.headers[b'Content-Type'] = FRAMINGTYPE
- if isinstance(rsp, wireprototypes.bytesresponse):
- action, meta = reactor.oncommandresponseready(outstream,
- command['requestid'],
- rsp.data)
- elif isinstance(rsp, wireprototypes.cborresponse):
+ if isinstance(rsp, wireprototypes.cborresponse):
encoded = cbor.dumps(rsp.value, canonical=True)
action, meta = reactor.oncommandresponseready(outstream,
command['requestid'],