##// END OF EJS Templates
hgweb: introduce helper method to update req.env
Yuya Nishihara -
r10673:9848b39a stable
parent child Browse files
Show More
@@ -284,8 +284,7 b' class hgwebdir(object):'
284 284 for column in sortable]
285 285
286 286 self.refresh()
287 if self._baseurl is not None:
288 req.env['SCRIPT_NAME'] = self._baseurl
287 self.updatereqenv(req.env)
289 288
290 289 return tmpl("index", entries=entries, subdir=subdir,
291 290 sortcolumn=sortcolumn, descending=descending,
@@ -308,8 +307,7 b' class hgwebdir(object):'
308 307 def config(section, name, default=None, untrusted=True):
309 308 return self.ui.config(section, name, default, untrusted)
310 309
311 if self._baseurl is not None:
312 req.env['SCRIPT_NAME'] = self._baseurl
310 self.updatereqenv(req.env)
313 311
314 312 url = req.env.get('SCRIPT_NAME', '')
315 313 if not url.endswith('/'):
@@ -339,3 +337,7 b' class hgwebdir(object):'
339 337 "staticurl": staticurl,
340 338 "sessionvars": sessionvars})
341 339 return tmpl
340
341 def updatereqenv(self, env):
342 if self._baseurl is not None:
343 env['SCRIPT_NAME'] = self._baseurl
General Comments 0
You need to be logged in to leave comments. Login now