mercurial/hgweb/hgwebdir_mod.py
changeset 14076 924c82157d46
parent 13975 938fbeacac84
child 14913 44382887d012
child 15001 dd74cd1e5d49
equal deleted inserted replaced
14075:bc101902a68d 14076:924c82157d46
     7 # GNU General Public License version 2 or any later version.
     7 # GNU General Public License version 2 or any later version.
     8 
     8 
     9 import os, re, time
     9 import os, re, time
    10 from mercurial.i18n import _
    10 from mercurial.i18n import _
    11 from mercurial import ui, hg, scmutil, util, templater
    11 from mercurial import ui, hg, scmutil, util, templater
    12 from mercurial import error, encoding, url
    12 from mercurial import error, encoding
    13 from common import ErrorResponse, get_mtime, staticfile, paritygen, \
    13 from common import ErrorResponse, get_mtime, staticfile, paritygen, \
    14                    get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
    14                    get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
    15 from hgweb_mod import hgweb
    15 from hgweb_mod import hgweb
    16 from request import wsgirequest
    16 from request import wsgirequest
    17 import webutil
    17 import webutil
   362                                              "sessionvars": sessionvars})
   362                                              "sessionvars": sessionvars})
   363         return tmpl
   363         return tmpl
   364 
   364 
   365     def updatereqenv(self, env):
   365     def updatereqenv(self, env):
   366         if self._baseurl is not None:
   366         if self._baseurl is not None:
   367             u = url.url(self._baseurl)
   367             u = util.url(self._baseurl)
   368             env['SERVER_NAME'] = u.host
   368             env['SERVER_NAME'] = u.host
   369             if u.port:
   369             if u.port:
   370                 env['SERVER_PORT'] = u.port
   370                 env['SERVER_PORT'] = u.port
   371             env['SCRIPT_NAME'] = '/' + u.path
   371             env['SCRIPT_NAME'] = '/' + u.path