##// END OF EJS Templates
hgweb: make parsedrequest part of wsgirequest...
Gregory Szorc -
r36872:1f7d9024 default
parent child Browse files
Show More
@@ -304,7 +304,7 b' class hgweb(object):'
304 304 yield r
305 305
306 306 def _runwsgi(self, wsgireq, repo):
307 req = requestmod.parserequestfromenv(wsgireq.env)
307 req = wsgireq.req
308 308 rctx = requestcontext(self, repo)
309 309
310 310 # This state is global across all threads.
@@ -287,6 +287,11 b' class hgwebdir(object):'
287 287 real = repos.get(virtualrepo)
288 288 if real:
289 289 wsgireq.env['REPO_NAME'] = virtualrepo
290 # We have to re-parse because of updated environment
291 # variable.
292 # TODO this is kind of hacky and we should have a better
293 # way of doing this than with REPO_NAME side-effects.
294 wsgireq.req = requestmod.parserequestfromenv(wsgireq.env)
290 295 try:
291 296 # ensure caller gets private copy of ui
292 297 repo = hg.repository(self.ui.copy(), real)
@@ -254,6 +254,8 b' class wsgirequest(object):'
254 254 self.server_write = None
255 255 self.headers = []
256 256
257 self.req = parserequestfromenv(wsgienv)
258
257 259 def respond(self, status, type, filename=None, body=None):
258 260 if not isinstance(type, str):
259 261 type = pycompat.sysstr(type)
General Comments 0
You need to be logged in to leave comments. Login now