Patchwork D2823: hgweb: construct {url} with req.apppath

login
register
mail settings
Submitter phabricator
Date March 12, 2018, 9:38 p.m.
Message ID <c1c95a68d450ee2eddd3422166946d1a@localhost.localdomain>
Download mbox | patch
Permalink /patch/29397/
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 rHG006165d4d7e2: hgweb: construct {url} with req.apppath (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2823?vs=6889&id=6954

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

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
@@ -496,10 +496,6 @@ 
         def config(section, name, default=uimod._unset, untrusted=True):
             return self.ui.config(section, name, default, untrusted)
 
-        url = wsgireq.env.get('SCRIPT_NAME', '')
-        if not url.endswith('/'):
-            url += '/'
-
         vars = {}
         styles, (style, mapfile) = hgweb_mod.getstyle(wsgireq.req, config,
                                                       self.templatepath)
@@ -517,7 +513,7 @@ 
         defaults = {
             "encoding": encoding.encoding,
             "motd": motd,
-            "url": url,
+            "url": wsgireq.req.apppath + '/',
             "logourl": logourl,
             "logoimg": logoimg,
             "staticurl": staticurl,