[http] drop use-request-subdomain feature (closes #2251986)

This feature do not have any user nowaday and lays in the path to WSGI.

authorPierre-Yves David <pierre-yves.david@logilab.fr>
changeset805a257709f6
branchdefault
phasepublic
hiddenno
parent revision#8be58694f416 backport stable
child revision#48ef505aa9f9 [request] gather all base_url logic in a single place (closes #2200756)
files modified by this revision
cwconfig.py
etwist/server.py
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@logilab.fr>
# Date 1331829028 -3600
# Thu Mar 15 17:30:28 2012 +0100
# Node ID 805a257709f6e7711636493e656da0c131c8a2df
# Parent 8be58694f4166128575ad37a0afb36f7c201af0b
[http] drop use-request-subdomain feature (closes #2251986)

This feature do not have any user nowaday and lays in the path to WSGI.

diff --git a/cwconfig.py b/cwconfig.py
@@ -384,18 +384,10 @@
1           {'type' : 'yn',
2            'default': False,
3            'help': 'allow users to login with their primary email if set',
4            'group': 'main', 'level': 2,
5            }),
6 -        ('use-request-subdomain',
7 -         {'type' : 'yn',
8 -          'default': None,
9 -          'help': ('if set, base-url subdomain is replaced by the request\'s '
10 -                   'host, to help managing sites with several subdomains in a '
11 -                   'single cubicweb instance'),
12 -          'group': 'main', 'level': 1,
13 -          }),
14          ('mangle-emails',
15           {'type' : 'yn',
16            'default': False,
17            'help': "don't display actual email addresses but mangle them if \
18  this option is set to yes",
diff --git a/etwist/server.py b/etwist/server.py
@@ -163,13 +163,10 @@
19              https = True
20              baseurl = self.https_url or self.base_url
21          else:
22              https = False
23              baseurl = self.base_url
24 -        if self.config['use-request-subdomain']:
25 -            baseurl = host_prefixed_baseurl(baseurl, host)
26 -            self.warning('used baseurl is %s for this request', baseurl)
27          req = CubicWebTwistedRequestAdapter(request, self.appli.vreg, https, baseurl)
28          if req.authmode == 'http':
29              # activate realm-based auth
30              realm = self.config['realm']
31              req.set_header('WWW-Authenticate', [('Basic', {'realm' : realm })], raw=False)