Author xtreak
Recipients Divya Rani, steven.daprano, xtreak
Date 2018-12-24.06:02:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> What is the module "cookiejar" you are importing? Is that a third-party module? It doesn't seem to be in the standard library. There is a module `http.cookiejar` but it doesn't seem to have an `is_HDN` function.

is_HDN does exist in http.cookiejar [0] which I assume OP is referring to but it's undocumented and used internally in other functions. From the comments and given it was added in 2a6ba9097ee (2004) this may not be as extensive as the guava implementation which I assume is at [1]

IPV4_RE = re.compile(r"\.\d+$", re.ASCII)
def is_HDN(text):
    """Return True if text is a host domain name."""
    # XXX
    # This may well be wrong.  Which RFC is HDN defined in, if any (for
    #  the purposes of RFC 2965)?
    # For the current implementation, what about IPv6?  Remember to look
    #  at other uses of IPV4_RE also, if change this.
        return False
    if text == "":
        return False
    if text[0] == "." or text[-1] == ".":
        return False
    return True

Date User Action Args
2018-12-24 06:02:40xtreaksetrecipients: + xtreak, steven.daprano, Divya Rani
2018-12-24 06:02:38xtreaksetmessageid: <>
2018-12-24 06:02:38xtreaklinkissue35573 messages
2018-12-24 06:02:38xtreakcreate