Show More
@@ -330,7 +330,7 b' class hgweb(object):' | |||
|
330 | 330 | |
|
331 | 331 | # Route it to a wire protocol handler if it looks like a wire protocol |
|
332 | 332 | # request. |
|
333 |
protohandler = wireprotoserver.parsehttprequest(rctx, wsgireq, |
|
|
333 | protohandler = wireprotoserver.parsehttprequest(rctx, wsgireq, req, | |
|
334 | 334 | self.check_perm) |
|
335 | 335 | |
|
336 | 336 | if protohandler: |
@@ -150,7 +150,7 b' class httpv1protocolhandler(wireprototyp' | |||
|
150 | 150 | def iscmd(cmd): |
|
151 | 151 | return cmd in wireproto.commands |
|
152 | 152 | |
|
153 |
def parsehttprequest(rctx, wsgireq, |
|
|
153 | def parsehttprequest(rctx, wsgireq, req, checkperm): | |
|
154 | 154 | """Parse the HTTP request for a wire protocol request. |
|
155 | 155 | |
|
156 | 156 | If the current request appears to be a wire protocol request, this |
@@ -159,16 +159,17 b' def parsehttprequest(rctx, wsgireq, quer' | |||
|
159 | 159 | request. Otherwise, ``None`` is returned. |
|
160 | 160 | |
|
161 | 161 | ``wsgireq`` is a ``wsgirequest`` instance. |
|
162 | ``req`` is a ``parsedrequest`` instance. | |
|
162 | 163 | """ |
|
163 | 164 | repo = rctx.repo |
|
164 | 165 | |
|
165 | 166 | # HTTP version 1 wire protocol requests are denoted by a "cmd" query |
|
166 | 167 | # string parameter. If it isn't present, this isn't a wire protocol |
|
167 | 168 | # request. |
|
168 |
if 'cmd' not in |
|
|
169 | if 'cmd' not in req.querystringdict: | |
|
169 | 170 | return None |
|
170 | 171 | |
|
171 |
cmd = |
|
|
172 | cmd = req.querystringdict['cmd'][0] | |
|
172 | 173 | |
|
173 | 174 | # The "cmd" request parameter is used by both the wire protocol and hgweb. |
|
174 | 175 | # While not all wire protocol commands are available for all transports, |
General Comments 0
You need to be logged in to leave comments.
Login now