##// END OF EJS Templates
wireprotoserver: check if command available before calling it...
Gregory Szorc -
r36816:7574c817 default
parent child Browse files
Show More
@@ -235,14 +235,14 def _callhttp(repo, req, proto, cmd):
235 for chunk in gen:
235 for chunk in gen:
236 yield chunk
236 yield chunk
237
237
238 rsp = wireproto.dispatch(repo, proto, cmd)
239
240 if not wireproto.commands.commandavailable(cmd, proto):
238 if not wireproto.commands.commandavailable(cmd, proto):
241 req.respond(HTTP_OK, HGERRTYPE,
239 req.respond(HTTP_OK, HGERRTYPE,
242 body=_('requested wire protocol command is not available '
240 body=_('requested wire protocol command is not available '
243 'over HTTP'))
241 'over HTTP'))
244 return []
242 return []
245
243
244 rsp = wireproto.dispatch(repo, proto, cmd)
245
246 if isinstance(rsp, bytes):
246 if isinstance(rsp, bytes):
247 req.respond(HTTP_OK, HGTYPE, body=rsp)
247 req.respond(HTTP_OK, HGTYPE, body=rsp)
248 return []
248 return []
General Comments 0
You need to be logged in to leave comments. Login now