mercurial/hgweb/webcommands.py
branchstable
changeset 43742 6ff1a0d109c9
parent 43117 8ff1ecfadcd1
child 43980 3e4294aa7944
equal deleted inserted replaced
43741:8accf5fa9930 43742:6ff1a0d109c9
  1319     # a repo owner may set web.static in .hg/hgrc to get any file
  1319     # a repo owner may set web.static in .hg/hgrc to get any file
  1320     # readable by the user running the CGI script
  1320     # readable by the user running the CGI script
  1321     static = web.config(b"web", b"static", untrusted=False)
  1321     static = web.config(b"web", b"static", untrusted=False)
  1322     if not static:
  1322     if not static:
  1323         tp = web.templatepath or templater.templatepaths()
  1323         tp = web.templatepath or templater.templatepaths()
  1324         if isinstance(tp, str):
  1324         if isinstance(tp, bytes):
  1325             tp = [tp]
  1325             tp = [tp]
  1326         static = [os.path.join(p, b'static') for p in tp]
  1326         static = [os.path.join(p, b'static') for p in tp]
  1327 
  1327 
  1328     staticfile(static, fname, web.res)
  1328     staticfile(static, fname, web.res)
  1329     return web.res.sendresponse()
  1329     return web.res.sendresponse()