'(Internal) Get the appropriate resource for the given host.'

def _getResourceForRequest(self, request):

    hostHeader = request.getHeader('host')
    if (hostHeader == None):
        return (self.default or resource.NoResource())
    else:
        host = hostHeader.lower().split(':', 1)[0]
    return (self.hosts.get(host, self.default) or resource.NoResource(('host    %s    not    in    vhost    map' % repr(host))))
