Patchwork D2817: hgweb: construct static URL like hgweb does

login
register
mail settings
Submitter phabricator
Date March 12, 2018, 9:38 p.m.
Message ID <df651c5a291bebb89529522cba45b5f3@localhost.localdomain>
Download mbox | patch
Permalink /patch/29391/
State Not Applicable
Headers show

Comments

phabricator - March 12, 2018, 9:38 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa5c478843c82: hgweb: construct static URL like hgweb does (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2817?vs=6883&id=6947

REVISION DETAIL
  https://phab.mercurial-scm.org/D2817

AFFECTED FILES
  mercurial/hgweb/hgwebdir_mod.py

CHANGE DETAILS




To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
@@ -542,7 +542,8 @@ 
         sessionvars = webutil.sessionvars(vars, r'?')
         logourl = config('web', 'logourl')
         logoimg = config('web', 'logoimg')
-        staticurl = config('web', 'staticurl') or url + 'static/'
+        staticurl = (config('web', 'staticurl')
+                     or wsgireq.req.apppath + '/static/')
         if not staticurl.endswith('/'):
             staticurl += '/'