Extended Host Validation

Examples:

Objects and Endpoints:

Object: Host

A Host consists of either:
print
Object: Print

Example

"print": {
	"unicode": "😻.😻.😻",
	"unicode-email": "😻.😻.😻",
	"idna": "xn--238h.xn--238h.xn--238h",
	"idna-email": "xn--238h.xn--238h.xn--238h",
	"percent-encoded": "%F0%9F%98%BB.%F0%9F%98%BB.%F0%9F%98%BB"
}
literal
Number
Host Literal

"juandefu.ca" is a non Literal: 0
"[127.0.0.1]" is Literal: 1
"[IPv6:::]" is an IPv6 Literal: 1

Constants

Key Value
0 Non Literal
1 Literal: []
2 Literal: [IPv4:]
3 Literal: [IPv6:]
4 Literal: [IPv4z:]
5 Literal: [IPv6z:]


Example

"literal": 0
zoneid
Object: ZoneID

Example

"zoneid": {
	"print": {
		"uri": "%25%F0%9F%92%A9",
		"iri": "%25💩"
	},
	"encoding": {
		"unicode": true
	},
	"zoneid": "💩",
	"correct": true
}
ip
Object: IP

Example

"ip": {
	"print": {
		"ipv4": "127.0.0.1",
		"ipv6short": "::ffff:7f00:1",
		"ipv6v4short": "::ffff:127.0.0.1",
		"ipv6long": "0000:0000:0000:0000:0000:ffff:7f00:0001"
	},
	"blocks": [
		{
			"size": 8,
			"base": 10,
			"number": 127,
			"correct": true
		},
		{
			"size": 8,
			"base": 10,
			"correct": true
		},
		{
			"size": 8,
			"base": 10,
			"correct": true
		},
		{
			"size": 8,
			"base": 10,
			"number": 1,
			"correct": true
		}
	],
	"bytes": [
		127,
		0,
		0,
		1
	],
	"version": 4,
	"correct": true
}
ipvfuture
Object: IPvFuture

Example

"ipvfuture": {
	"version": "0",
	"ip": "abcdefghijklmnopqrstuABCDEFGHIJ.-_~!$\u0026'()*+,;=:"
}
hostname
Object: Hostname

Example

"hostname": {
	"print": {
		"unicode": "😻.😻.😻",
		"idna": "xn--238h.xn--238h.xn--238h",
		"percent-encoded": "%F0%9F%98%BB.%F0%9F%98%BB.%F0%9F%98%BB"
	},
	"labels": [
		{
			"print": {
				"unicode": "😻"
			},
			"encoding": {
				"unicode": true,
				"idna-excluded": true
			},
			"delimiter": 1,
			"correct": true
		},
		{
			"print": {
				"unicode": "😻"
			},
			"encoding": {
				"idna": true,
				"idna-excluded": true
			},
			"delimiter": 1,
			"correct": true
		},
		{
			"print": {
				"unicode": "😻"
			},
			"encoding": {
				"pe-necessary": true,
				"idna-excluded": true
			},
			"correct": true
		}
	],
	"tld-pos": -1
}
dangerous
Boolean
Is this Potentially Dangerous?

Example

"dangerous": false
correct
Boolean
Was Input Correct to the Spec?

Example

"correct": true
correct-email
Boolean
Was Input Correct to the Email Spec?

Example

"correct-email": true

Object Examples: Host

ASCII Hostname Input: "juandefu.ca"
{
	"print": {
		"unicode": "juandefu.ca",
		"unicode-email": "juandefu.ca",
		"idna": "juandefu.ca",
		"idna-email": "juandefu.ca",
		"percent-encoded": "juandefu.ca"
	},
	"hostname": {
		"print": {
			"unicode": "juandefu.ca",
			"idna": "juandefu.ca",
			"percent-encoded": "juandefu.ca"
		},
		"labels": [
			{
				"print": {
					"unicode": "juandefu"
				},
				"encoding": {},
				"delimiter": 1,
				"correct": true
			},
			{
				"print": {
					"unicode": "ca"
				},
				"encoding": {},
				"correct": true
			}
		],
		"correct": true,
		"correct-email": true,
		"tld-real": true,
		"tld-pos": 1
	},
	"correct": true,
	"correct-email": true
}
IPv4 Input: "127.0.0.1"
{
	"print": {
		"unicode": "127.0.0.1",
		"unicode-email": "[127.0.0.1]",
		"idna": "127.0.0.1",
		"idna-email": "[127.0.0.1]",
		"percent-encoded": "127.0.0.1"
	},
	"ip": {
		"print": {
			"ipv4": "127.0.0.1",
			"ipv6short": "::ffff:7f00:1",
			"ipv6v4short": "::ffff:127.0.0.1",
			"ipv6long": "0000:0000:0000:0000:0000:ffff:7f00:0001"
		},
		"blocks": [
			{
				"size": 8,
				"base": 10,
				"number": 127,
				"correct": true
			},
			{
				"size": 8,
				"base": 10,
				"correct": true
			},
			{
				"size": 8,
				"base": 10,
				"correct": true
			},
			{
				"size": 8,
				"base": 10,
				"number": 1,
				"correct": true
			}
		],
		"bytes": [
			127,
			0,
			0,
			1
		],
		"version": 4,
		"correct": true
	},
	"correct": true
}
IPv6 ZoneID Input: "[IPv6:::%25💩]"
{
	"print": {
		"unicode": "[::]",
		"unicode-email": "[IPv6:::]",
		"idna": "[::]",
		"idna-email": "[IPv6:::]",
		"percent-encoded": "[::]"
	},
	"literal": 3,
	"zoneid": {
		"print": {
			"uri": "%25%F0%9F%92%A9",
			"iri": "%25💩"
		},
		"encoding": {
			"unicode": true
		},
		"zoneid": "💩",
		"correct": true
	},
	"ip": {
		"print": {
			"ipv4": "0.0.0.0",
			"ipv6short": "::",
			"ipv6v4short": "::0.0.0.0",
			"ipv6long": "0000:0000:0000:0000:0000:0000:0000:0000"
		},
		"blocks": [
			{
				"base": 16,
				"correct": true,
				"position": 1
			},
			{
				"base": 16,
				"correct": true,
				"position": 1
			},
			{
				"base": 16,
				"correct": true,
				"position": 1
			},
			{
				"base": 16,
				"correct": true,
				"position": 1
			},
			{
				"base": 16,
				"correct": true,
				"position": 1
			},
			{
				"base": 16,
				"correct": true,
				"position": 1
			},
			{
				"base": 16,
				"correct": true,
				"position": 1
			},
			{
				"base": 16,
				"correct": true,
				"position": 1
			}
		],
		"bytes": [
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0,
			0
		],
		"version": 6,
		"correct": true
	}
}
IPvFuture Input: "[v0.abcdefghijklmnopqrstuABCDEFGHIJ.-_~!$&'()*+,;=:]"
{
	"print": {
		"unicode": "[v0.abcdefghijklmnopqrstuABCDEFGHIJ.-_~!$\u0026'()*+,;=:]",
		"unicode-email": "[v0.abcdefghijklmnopqrstuABCDEFGHIJ.-_~!$\u0026'()*+,;=:]",
		"idna": "[v0.abcdefghijklmnopqrstuABCDEFGHIJ.-_~!$\u0026'()*+,;=:]",
		"idna-email": "[v0.abcdefghijklmnopqrstuABCDEFGHIJ.-_~!$\u0026'()*+,;=:]",
		"percent-encoded": "[v0.abcdefghijklmnopqrstuABCDEFGHIJ.-_~!$\u0026'()*+,;=:]"
	},
	"literal": 1,
	"ipvfuture": {
		"version": "0",
		"ip": "abcdefghijklmnopqrstuABCDEFGHIJ.-_~!$\u0026'()*+,;=:"
	},
	"dangerous": true,
	"correct": true
}
Unicode.IDNA.PercentEncoded Hostname Input: "😻.xn--238h.%F0%9F%98%BB"
{
	"print": {
		"unicode": "😻.😻.😻",
		"unicode-email": "😻.😻.😻",
		"idna": "xn--238h.xn--238h.xn--238h",
		"idna-email": "xn--238h.xn--238h.xn--238h",
		"percent-encoded": "%F0%9F%98%BB.%F0%9F%98%BB.%F0%9F%98%BB"
	},
	"hostname": {
		"print": {
			"unicode": "😻.😻.😻",
			"idna": "xn--238h.xn--238h.xn--238h",
			"percent-encoded": "%F0%9F%98%BB.%F0%9F%98%BB.%F0%9F%98%BB"
		},
		"labels": [
			{
				"print": {
					"unicode": "😻"
				},
				"encoding": {
					"unicode": true,
					"idna-excluded": true
				},
				"delimiter": 1,
				"correct": true
			},
			{
				"print": {
					"unicode": "😻"
				},
				"encoding": {
					"idna": true,
					"idna-excluded": true
				},
				"delimiter": 1,
				"correct": true
			},
			{
				"print": {
					"unicode": "😻"
				},
				"encoding": {
					"pe-necessary": true,
					"idna-excluded": true
				},
				"correct": true
			}
		],
		"tld-pos": -1
	}
}

Object: Host_Options

POST APIs only support setting Options. Attributes are displayed when set to true.
GET APIs return the Default set Options.
print
Object: Print_Options
literal
Boolean
zoneid
Object: ZoneID_Options
ip
Object: IP_Options
ipvfuture
Boolean
hostname
Object: Hostname_Options
dangerous
Boolean
correct
Boolean
correct-email
Boolean

Object Examples: Host_Options

Default Options:
{
	"print": {
		"unicode": true,
		"unicode-email": true,
		"idna": true,
		"idna-email": false,
		"percent-encoded": false
	},
	"literal": true,
	"zoneid": {
		"print": {
			"uri": true,
			"iri": true
		},
		"encoding": {
			"cleaned": true,
			"unicode": true,
			"pe-necessary": true,
			"pe-unnecessary": true,
			"pe-partial": true,
			"pe-invalid": true
		},
		"zoneid": true,
		"correct": true
	},
	"ip": {
		"print": {
			"parsed": false,
			"ipv4": true,
			"ipv4historic": false,
			"ipv6short": true,
			"ipv6v4short": true,
			"ipv6long": true,
			"ipv6v4long": false
		},
		"blocks": {
			"print": null,
			"size": true,
			"base": true,
			"number": true,
			"pads": true,
			"correct": true,
			"position": true
		},
		"bytes": true,
		"version": true,
		"doublecolon-v6": true,
		"doublecolon-v6v4": true,
		"correct": true,
		"private": false,
		"loopback": false,
		"linklocal": false,
		"reserved": false
	},
	"ipvfuture": true,
	"hostname": {
		"print": {
			"unicode": true,
			"idna": true,
			"percent-encoded": true
		},
		"labels": {
			"print": {
				"unicode": true,
				"idna": false,
				"percent-encoded": false
			},
			"encoding": {
				"cleaned": true,
				"unicode": true,
				"pe-necessary": true,
				"pe-unnecessary": true,
				"pe-partial": true,
				"idna": true,
				"idna-invalid": true,
				"idna-normalized": true,
				"idna-normalize-failed": true,
				"idna-excluded": true
			},
			"delimiter": true,
			"correct": true
		},
		"email-toolong": true,
		"dangerous": true,
		"correct": true,
		"correct-email": true,
		"tld": true,
		"tld-invalid": true,
		"tld-real": true,
		"tld-root": true,
		"tld-pos": true
	},
	"dangerous": true,
	"correct": true,
	"correct-email": true
}

Object: Print

unicode
String
Unicode Output

Example

"unicode": "output"
"unicode": "😻"
unicode-email
String
Unicode Email Output

Example

"unicode-email": "output"
"unicode-email": "😻"
idna
String
IDNA Output

Example

"idna": "output"
"idna": "xn--238h"
idna-email
String
IDNA Email Output

Example

"idna": "output"
"idna-email": "xn--238h"
percent-encoded
String
Percent Encoded Output

Example

"percent-encoded": "output"
"percent-encoded": "%F0%9F%98%BB"

Object Examples: Print

ASCII Input: "juandefu.ca"
{
	"unicode": "juandefu.ca",
	"unicode-email": "juandefu.ca",
	"idna": "juandefu.ca",
	"idna-email": "juandefu.ca",
	"percent-encoded": "juandefu.ca"
}
IPv4 Input: "127.0.0.1"
{
	"unicode": "127.0.0.1",
	"unicode-email": "[127.0.0.1]",
	"idna": "127.0.0.1",
	"idna-email": "[127.0.0.1]",
	"percent-encoded": "127.0.0.1"
}
IPv6 Input: "[IPv6:::]"
{
	"unicode": "[::]",
	"unicode-email": "[IPv6:::]",
	"idna": "[::]",
	"idna-email": "[IPv6:::]",
	"percent-encoded": "[::]"
}
Unicode.IDNA.PercentEncoded Input: "😻.xn--238h.%F0%9F%98%BB"
{
	"unicode": "😻.😻.😻",
	"unicode-email": "😻.😻.😻",
	"idna": "xn--238h.xn--238h.xn--238h",
	"idna-email": "xn--238h.xn--238h.xn--238h",
	"percent-encoded": "%F0%9F%98%BB.%F0%9F%98%BB.%F0%9F%98%BB"
}

Object: Print_Options

POST APIs only support setting Options. Attributes are displayed when set to true.
GET APIs return the Default set Options.
unicode
Boolean
unicode-email
Boolean
idna
Boolean
idna-email
Boolean
percent-encoded
Boolean