ietf-nntp Wildmats
Clive D.W. Feather
clive at demon.net
Tue Mar 13 03:04:54 PST 2001
Charles Lindsey said:
>> If we do this, then I recommend that we ban backslash entirely in
>> wildmats, including in [...] sets. This allows them to be used in the
>> future if we ever need an escape mechanism and in the meantime
>> eliminates some potential confusion.
>
> If you ban backslash, then there are other candidates for banning too,
> such as comma which you mention later on. I think it would be simpler
> just to specify those characters which you DO allow, with a NOTE to the
> effect that wildmats are for matching newsgroup-names, and the allowed
> characters reflect that.
I disagree. We don't specify the valid characters in newsgroup names
either. We should leave wildmat as wide as possible. Basically comma and
backslash should be banned but nothing else.
>> Which reminds me: *somewhere* we need text along the lines of:
>
>> If a parameter that is specified as a wildmat does not meet the
>> syntax of 5.1.1, the NNTP server MAY place some interpretation on it
>> (not specified by this document) or otherwise MUST generate a 501
>> response.
>
> I think what you say is that extensions to this standard MAY extend the
> list of allowed characters or augment the syntax in a backward-compatible
> fashion so as to allow the use of wildmats in other contexts, in which
> case the extended syntax MAY be used even when matching newsgroups (though
> it would not cause anything new to be matched). The only extension likely
> to want to do this is XPAT, which is deligthfully silent on this issue so
> far.
Um, something like that.
>>>> 5.1.2 Formalised syntax
> I think it was a useful exercise to demonstrate that your original method
> was better.
Agreed.
>>>> If the first char in a range has a higher code than the second one, the
>>>> characters represented by the range are determined by the implementation.
>>>> This must be done in a consistent manner, so that, for example,
>>>> "[d-a],[^d-a]" will match every possible character.
>> We had this discussion previously. The consensus was that all ranges
>> should match exactly one character, and that such ranges were allowed
>> but had no definition of which characters matched. That is, the existing
>> wording.
>
>> The only question left is the one I asked: do we require consistency or
>> not ?
>
> Hmm! I would prefer disallowing it. But if the consensus was otherwise,
> then I suppose consistency is a good thing. Would it be possible to say
> that [d-a] was allowed syntactically, but would never match anything. In
> that case it would still happen that "[d-a],[^d-a]" would match
> everything.
I think you misunderstand me. The consensus from last time was that "[d-a]"
would match exactly one character. That is, there exists a legitimate set
that it's equivalent to.
I'd like opinions (not just yours) on the following choices:
(1) Within a set, "d-a" is ignored. This means that:
* "[d-a]" never matches anything
* "[^d-a]" is equivalent to "?"
* "[d-ax-z]" is equivalent to "[x-z]"
* "[^d-ax-z]" is equivalent to "[^x-z]"
(2) Within a set, "d-a" is converted by the implementation to some
(legal) set (not necessarily a range), converting it the same way
each time. This means that:
* "[d-a]", "[d-ad-a]", and "[d-a],[d-a]" all match the same set
* "[d-a],[^d-a]" matches every possible one-character string
* nothing matches both "[d-a]" and "[^d-a]"
* "[d-ax-z],[^d-ax-z]" also matches every possible one-character string
* nothing matches both "[d-ax-z]" and "[^d-ax-z]"
* "[d-ax-z]" definitely matches "x", "y", and "z"
(3) Within a set, "d-a" causes the entire set contents (including the "^")
to be replaced by an arbitrary set of characters that may differ each
time it occurs. This means that:
* "[d-a]", "[d-ad-a]", and "[d-a],[d-a]" might all match different sets
* "[d-a],[^d-a]" might not match some one-character strings
* something could match both "[d-a]" and "[^d-a]"
* "[d-ax-z]" might not match "x"
--
Clive D.W. Feather | Work: <clive at demon.net> | Tel: +44 20 8371 1138
Internet Expert | Home: <clive at davros.org> | Fax: +44 20 8371 1037
Demon Internet | WWW: http://www.davros.org | DFax: +44 20 8371 4037
Thus plc | | Mobile: +44 7973 377646
More information about the ietf-nntp
mailing list