Mercurial > libervia-web
diff src/server/server.py @ 884:763da94ba28b
blog (atom): base_url_ext can now only specify scheme, or netloc, or path, it will be used to complete data coming from request's path
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 09 Mar 2016 20:40:27 +0100 |
parents | 6bdee34fa2f4 |
children | e8b133b77aa4 |
line wrap: on
line diff
--- a/src/server/server.py Wed Mar 09 20:40:27 2016 +0100 +++ b/src/server/server.py Wed Mar 09 20:40:27 2016 +0100 @@ -1469,8 +1469,13 @@ self.base_url_ext = self.options.pop('base_url_ext') if self.base_url_ext[-1] != '/': self.base_url_ext += '/' + self.base_url_ext_data = urlparse.urlsplit(self.base_url_ext) else: self.base_url_ext = None + # we split empty string anyway so we can do things like + # scheme = self.base_url_ext_data.scheme or 'https' + self.base_url_ext_data = urlparse.urlsplit('') + if not self.options['port_https_ext']: self.options['port_https_ext'] = self.options['port_https'] if self.options['data_dir'] == DATA_DIR_DEFAULT: