W3C home > Mailing lists > Public > uri@w3.org > March 2003

Re: RFC2396bis, qualified, a nit

From: Clive D.W. Feather <clive@demon.net>
Date: Mon, 3 Mar 2003 07:59:50 +0000
To: Graham Klyne <GK@ninebynine.org>
Cc: "Roy T. Fielding" <fielding@apache.org>, uri@w3.org
Message-ID: <20030303075950.GV1989@finch-staff-1.thus.net>

Graham Klyne said:
> Ref:
> [[
>    hostname      = domainlabel [ qualified ]
>    qualified     = *( "." domainlabel ) [ "." toplabel [ "." ] ]
>    domainlabel   = alphanum [ 0*61( alphanum | "-" ) alphanum ]
>    toplabel      = alpha    [ 0*61( alphanum | "-" ) alphanum ]
>    alphanum      = ALPHA / DIGIT
> ]]
> 
> I think the syntax production 'qualified' is ambiguous (i.e. permits more 
> than one parse tree for some valid values).

Is this the only place "qualified" is used? If so, then there's a further
ambiguity - if a hostname consists only of a single domainlabel, is it
followed by a zero-length qualified or not. I would suggest that the
correct resolution is either:

     hostname      = domainlabel [ qualified ]
     qualified     = *( "." domainlabel ) "." toplabel [ "." ]

if you want to forbid hostnames like "abc.123", or:

     hostname      = domainlabel [ qualified ]
     qualified     = 1*( "." domainlabel ) [ "." ]
or
     hostname      = domainlabel [ qualified ] [ "." ]
     qualified     = 1*( "." domainlabel )

(these are not equivalent) if you want to allow them.

From the rest of this thread, people want to treat the last component
specially (require it to start with a letter), but I'm not sure in which
contexts, so I can't comment further.

If someone will go through the following list and say "yes" or "no" to
each, I can tell you the right syntax:

    abc                     abc.
    123                     123.
    abc.abc                 abc.abc.
    abc.123                 abc.123.
    123.abc                 123.abc.
    123.123                 123.123.
    abc.abc.abc             abc.abc.abc.
    abc.abc.123             abc.abc.123.
    abc.123.abc             abc.123.abc.
    abc.123.123             abc.123.123.
    123.abc.abc             123.abc.abc.
    123.abc.123             123.abc.123.
    123.123.abc             123.123.abc.
    123.123.123             123.123.123.

-- 
Clive D.W. Feather  | Work:  <clive@demon.net>   | Tel:  +44 20 8371 1138
Internet Expert     | Home:  <clive@davros.org>  | Fax:  +44 870 051 9937
Demon Internet      | WWW: http://www.davros.org | Mobile: +44 7973 377646
Thus plc            |                            |
Received on Monday, 3 March 2003 03:59:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:05 UTC