Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

HttpCanonicalOriginAuthority

function HttpCanonicalOriginAuthority(const aAuthority: string; out aCanonical: string): Boolean;
Normalises an HTTPS authority (host or host:port) so that two can be compared, as the TCP components do for AltSvc.Origin: DNS names lowercased, IPv6 bracketed in RFC 5952 form, port 443 dropped. False, with aCanonical '', for anything else: userinfo, a path, query or fragment character, a non-ASCII name (use its A-label form), an IPv6 zone, a numeric host that is not strict dotted IPv4, port 0. A trailing dot is kept, so 'example.com.' is a different origin from 'example.com'.