'Test whether webserver redirects.'

def any_redirect(self, name, port=80, headers=None):

    url = 'http://{0}:{1}'.format(name, port)
    if headers:
        response = requests.get(url, headers=headers, allow_redirects=False)
    else:
        response = requests.get(url, allow_redirects=False)
    return (response.status_code in xrange(300, 309))
