##// 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 b' def _callhttp(repo, req, proto, cmd):'
235 235 for chunk in gen:
236 236 yield chunk
237 237
238 rsp = wireproto.dispatch(repo, proto, cmd)
239
240 238 if not wireproto.commands.commandavailable(cmd, proto):
241 239 req.respond(HTTP_OK, HGERRTYPE,
242 240 body=_('requested wire protocol command is not available '
243 241 'over HTTP'))
244 242 return []
245 243
244 rsp = wireproto.dispatch(repo, proto, cmd)
245
246 246 if isinstance(rsp, bytes):
247 247 req.respond(HTTP_OK, HGTYPE, body=rsp)
248 248 return []
General Comments 0
You need to be logged in to leave comments. Login now