W3C home > Mailing lists > Public > public-html@w3.org > January 2009

Re: Setting document.domain

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 29 Jan 2009 06:21:55 +0000 (UTC)
To: Gervase Markham <gerv@mozilla.org>
Cc: Adam Barth <w3c@adambarth.com>, James Graham <jgraham@opera.com>, HTML WG <public-html@w3.org>, contact@publicsuffix.org
Message-ID: <Pine.LNX.4.62.0901290608010.952@hixie.dreamhostps.com>

On Thu, 29 Jan 2009, Gervase Markham wrote:
> 
> ==Matching Algorithm==
> 
> The list is designed to be matched against domain names. Given a domain
> name, consisting of one or more dot-separated labels, and a copy of the
> public suffix list containing a number of rules, there are three
> possible outcomes of a matching:
> 
>    1. there is no match between the public suffix list and the domain
>       name (e.g. "localhost.localdomain" or "intranet")
>    2. all labels in the domain name together form a public suffix (e.g.
>       "co.uk" or "nsw.edu.au")
>    3. a strict subset of labels in the domain name, beginning at the
>       right-hand end, together form a public suffix (e.g. "bbc.co.uk"
>       or "google.com")
> 
> To determine which is the correct outcome for a domain candidate.domain,
> the procedure is as follows:

Does 2 also include cases like "uk"? For HTML5's document.domain, I need 
that case as well.

The only other comment would be that it is helpful if there are 
defined terms, so that there is no ambiguity when "linking" the specs 
(with a parallel drawn to linking code). In this case, the three (or four) 
items in the list could be given names, e.g. "no match", "public match", 
and "private match" (or whatever).

With those labels, I could say

   If /new value/, when matched against the Public Suffix List, results 
   in a /public match/ with one of the suffixes, then throw a SECURITY_ERR 
   exception and abort these steps. [PSL]

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 29 January 2009 06:22:34 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:00 UTC