Remove unneeded condition

The CName loopkup middleware checked a hostname against the configured
domains. This check is likely a remnant from when cname lookup only
supported a single hostname. Now, however, the configured domain is
actually a list of domains, so checking a single hostname will never
match. The check isn't really needed anyway, as it has been broken since
swift 1.10.

Closes-Bug: #1402704
Change-Id: If9ff345b2c7c6d88f527cae643168bc725b26f8d
This commit is contained in:
Koert van der Veer 2014-12-15 15:56:13 +01:00 committed by Doug Hellmann
parent c23a66f66d
commit bfbf0d1e78

View File

@ -115,8 +115,6 @@ class CNAMELookupMiddleware(object):
port = ''
if ':' in given_domain:
given_domain, port = given_domain.rsplit(':', 1)
if given_domain == self.storage_domain[1:]: # strip initial '.'
return self.app(env, start_response)
if is_ip(given_domain):
return self.app(env, start_response)
a_domain = given_domain