'Host name provided in HTTP_HOST, with fall-back to SERVER_NAME'

def _host__get(self):

    if ('HTTP_HOST' in self.environ):
        return self.environ['HTTP_HOST']
    else:
        return ('%(SERVER_NAME)s:%(SERVER_PORT)s' % self.environ)
