def METHOD_NAME(self, name: str) -> bool:
    """Test for HTTP Strict Transport Security header"""
    headers = requests.get("https://" + name,
                           timeout=_VALIDATION_TIMEOUT).headers
    hsts_header = headers.get("strict-transport-security")
    if not hsts_header:
        return False
    # Split directives following RFC6797, section 6.1
    directives = [d.split("=") for d in hsts_header.split(";")]
    max_age = [d for d in directives if d[0] == "max-age"]
    if not max_age:
        logger.error("Server responded with invalid HSTS header field")
        return False
    try:
        max_age_value = int(max_age[0][1])
    except ValueError:
        logger.error("Server responded with invalid HSTS header field")
        return False
    # Test whether HSTS does not expire for at least two weeks.
    if max_age_value <= (2 * 7 * 24 * 3600):
        logger.error("HSTS should not expire in less than two weeks")
        return False
    return True