comparison 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
comparison
equal deleted inserted replaced
883:74be6217d913 884:763da94ba28b
1467 1467
1468 if self.options['base_url_ext']: 1468 if self.options['base_url_ext']:
1469 self.base_url_ext = self.options.pop('base_url_ext') 1469 self.base_url_ext = self.options.pop('base_url_ext')
1470 if self.base_url_ext[-1] != '/': 1470 if self.base_url_ext[-1] != '/':
1471 self.base_url_ext += '/' 1471 self.base_url_ext += '/'
1472 self.base_url_ext_data = urlparse.urlsplit(self.base_url_ext)
1472 else: 1473 else:
1473 self.base_url_ext = None 1474 self.base_url_ext = None
1475 # we split empty string anyway so we can do things like
1476 # scheme = self.base_url_ext_data.scheme or 'https'
1477 self.base_url_ext_data = urlparse.urlsplit('')
1478
1474 if not self.options['port_https_ext']: 1479 if not self.options['port_https_ext']:
1475 self.options['port_https_ext'] = self.options['port_https'] 1480 self.options['port_https_ext'] = self.options['port_https']
1476 if self.options['data_dir'] == DATA_DIR_DEFAULT: 1481 if self.options['data_dir'] == DATA_DIR_DEFAULT:
1477 coerceDataDir(self.options['data_dir']) # this is not done when using the default value 1482 coerceDataDir(self.options['data_dir']) # this is not done when using the default value
1478 1483