Accept protocol with or without a colon
function normalizeProtocol(protocol) {
	if (protocol && protocol.length > 0 && protocol.charAt(protocol.length - 1) !== ':') {
		return protocol + ':'
	}
	return protocol
}