equal
deleted
inserted
replaced
785 style = self.config("web", "style", "") |
785 style = self.config("web", "style", "") |
786 if req.form.has_key('style'): |
786 if req.form.has_key('style'): |
787 style = req.form['style'][0] |
787 style = req.form['style'][0] |
788 mapfile = style_map(self.templatepath, style) |
788 mapfile = style_map(self.templatepath, style) |
789 |
789 |
|
790 if req.env.get('HTTPS'): |
|
791 proto = 'https' |
|
792 default_port = "443" |
|
793 else: |
|
794 proto = 'http' |
|
795 default_port = "80" |
|
796 |
790 port = req.env["SERVER_PORT"] |
797 port = req.env["SERVER_PORT"] |
791 port = port != "80" and (":" + port) or "" |
798 port = port != default_port and (":" + port) or "" |
792 urlbase = 'http://%s%s' % (req.env['SERVER_NAME'], port) |
799 urlbase = '%s://%s%s' % (proto, req.env['SERVER_NAME'], port) |
793 staticurl = self.config("web", "staticurl") or req.url + 'static/' |
800 staticurl = self.config("web", "staticurl") or req.url + 'static/' |
794 if not staticurl.endswith('/'): |
801 if not staticurl.endswith('/'): |
795 staticurl += '/' |
802 staticurl += '/' |
796 |
803 |
797 if not self.reponame: |
804 if not self.reponame: |