##// END OF EJS Templates
wireprotoserver: return to using iscmd() method...
Augie Fackler -
r36249:72812ad2 default
parent child Browse files
Show More
@@ -170,6 +170,10 b' class httpv1protocolhandler(baseprotocol'
170 urlreq.quote(self._req.env.get('REMOTE_HOST', '')),
170 urlreq.quote(self._req.env.get('REMOTE_HOST', '')),
171 urlreq.quote(self._req.env.get('REMOTE_USER', '')))
171 urlreq.quote(self._req.env.get('REMOTE_USER', '')))
172
172
173 # This method exists mostly so that extensions like remotefilelog can
174 # disable a kludgey legacy method only over http. As of early 2018,
175 # there are no other known users, so with any luck we can discard this
176 # hook if remotefilelog becomes a first-party extension.
173 def iscmd(cmd):
177 def iscmd(cmd):
174 return cmd in wireproto.commands
178 return cmd in wireproto.commands
175
179
@@ -198,7 +202,7 b' def parsehttprequest(repo, req, query):'
198 # wire protocol requests to hgweb because it prevents hgweb from using
202 # wire protocol requests to hgweb because it prevents hgweb from using
199 # known wire protocol commands and it is less confusing for machine
203 # known wire protocol commands and it is less confusing for machine
200 # clients.
204 # clients.
201 if cmd not in wireproto.commands:
205 if not iscmd(cmd):
202 return None
206 return None
203
207
204 proto = httpv1protocolhandler(req, repo.ui)
208 proto = httpv1protocolhandler(req, repo.ui)
General Comments 0
You need to be logged in to leave comments. Login now