🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #44578

Re: [NNTP Draft] 9.4 The LIST Keyword (includes OVER & PAT)

#44578
From: Curt Welch
Date: Mon, 28 Feb 2000 00:00
140 lines
6927 bytes
Jeremy <bofh@netscum.dk> wrote:
> Curt Welch <curt@kcwc.com> wrote:

> Yes, that's why I don't think it belongs in PAT; it doesn't sound like
> the pattern matching is really what you're after.

In that light...

My latest thought on this new multi-header command is that it's probably
the right way to go in general as a replacement for all the XOVER/OVER/
XHDR/XPAT/PAT commands, but that instead of trying to get this resolved
now, it would make the most sense to just go with OVER and PAT like
they are (after resolving those outstanding issues of course), and make
this new command an EXTENSION that will be done later (or done now, but
independent of the basic NNTP RFC).

XHDR has been a defacto standard in use for over 10 years now and
it's damn sure time to get its functionality supported in the RFC.  Even if
we can't put XHDR in the standard as-is because of the X name problem, PAT
at least is a drop-in replacement for it and for XPAT. That means that any
client that currently uses XHDR and or XPAT, can switch to the new standard
just by changing the command name from XHDR to PAT, or from XPAT to PAT.
All the return codes and semantics are identical so nothing else needs to
be changed.  Same thing for XOVER to OVER.

You could even do a patch on the binary of an old, no longer supported,
newsreader and convert it from the old X cmds to the new RFC. (Overwrite
"XOVER" with "OVER " and "XPAT" with "PAT ", and "XHDR" with "PAT ".)

With this new HEADERS command, the newsreader author will have to get in
there and make some real changes to be able to use it.  So I don't think
it makes sense to think of removing OVER and PAT and replacing it with
this new command like I had suggested before.

If we get the HEADERS command figured out in time, and people want it,
then we could add it to the RFC, but if there's any issues or doubts, we
shouldn't let it hold up the current RFC.

> > But, in writing this, I came up with this syntax by accident
> > which even I think is kinda neat:
> >
> >   HEADERS 1- Message-ID From:*Jeremy* Subject:*NNTP* X-Meow
> >
> > Allow the wildmat to be added to any header using the colon!  How
> > simple and straight forward to both understand and parse.
>
> I like it.
>
> > The only thing this doesn't address is the multiple wildmats per header
> > issue (which I have no problem dropping support of),
>
> Fine by me.
>
> > and the question of AND vs OR.  i.e. should it display articles that
> > match all wildmats, or articles that match any wildmat.  I'm thinking
> > it would be best to go with the "ALL" option.
>
> Yes, AND is the way to go.  OR can be accomplished by performing multiple
> searches.
>
> > Oh, and there's also the NULL/zero length wildmat possibility with this
> > syntax. Should that match all empty headers? (i.e. article doesn't have
> > that header), or just be treated as * (i.e. same as no wildmat), or be
> > considered an error?
>
> You mean, "X-Meow:" versus "X-Meow"?

Yes, exactly.

> Treat "X-Meow:" as "X-Meow:*", and
> require the header to be present.

A way to test for the presence of the header.  Interesting.  So you would
have a way to say "only list articles which actually have an X-Meow
header."

But a wildmat of * will match the null string, so that's not the same thing
(but could be special cased to mean that anyway).

Well, if you have any "normal" wildmat that has at least one character, ?,
or character range[], then you will end up getting a result which will only
include articles that have X-Meow: headers.

So, yes, I think that type of semantic makes sense.  Without the colon, the
output will include articles even if they do not have the header.  The
field will just be empty.  With the colon, you will only get articles
listed which have the header.  And Header:* will be the same as Header:,
which will really "act" like Header:?*.

And, if it is techincally possible to inject an article into Usenet with
a empty header, then it's ok for a server to treat that semantically the
same as if the header wasn't there at all.

You need to say this because if the HEADERS command code is producing it's
output by looking at a traditionally formated XOVER database (which it will
be doing for most servers), there's no way for it to tell the difference
between an article with an empty header, or no header at all.  All it can
do is check for the difference between a zero length field and a non-zero
length field.

So this becomes a simple way to say, "show me all articles in the group
which have an X-Meow header":

    HEADERS 1- X-Meow:

Hey, and this:

    HEADERS 1-

is the same as LISTGROUP.  Interesting.  It gets to replace something
else at the same time.

Hmm, only one thing missing....

    HEADERS news.software.nntp:1-

There, now it's complete :).  Allow an optional <newsgroupname>: to
prefix the range.  If it's specified, it will not affect the "current
group", and the command will never affect the "current article" pointer
in any case.  Or maybe not.  Some servers maintain a lot of state
with the "current group", and in order to process this command for
a different group without lossing the context, it would have to perforam
the overhead to swtich to the new group, do the HEADERS command, and
then waste resources switching back to the old group.  Ok, maybe
it you specify the GROUP, it does set the "current group".  Current
article pointer should not change however.  And current group will
also not change when the <message-id> form of access is used.

Ah, but if that's the case, why not just force them to do the GROUP
command first.

Ok, maybe the newsgroupname: idea is going too far.

Anybody else have any thoughts about the merits of this command?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/

Technical Details
Message-ID: <20000228153833.742$B7@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <87aeknd2ua.fsf@erlenstar.demon.co.uk> <20000227162210.142$UD@newsreader.com> <951696824.53483@news.netscum.dk> <20000228025703.219$Yt@newsreader.com> <951759933.438276@news.netscum.dk>

Show Full Headers
Complete Article Headers
Message-ID: <20000228153833.742$B7@newsreader.com>
Subject: Re: [NNTP Draft] 9.4 The LIST Keyword (includes OVER & PAT)
Date: Mon, 28 Feb 2000 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <87aeknd2ua.fsf@erlenstar.demon.co.uk> <20000227162210.142$UD@newsreader.com> <951696824.53483@news.netscum.dk> <20000228025703.219$Yt@newsreader.com> <951759933.438276@news.netscum.dk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 591005319
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-User: Curt@NewsReader.Com
Organization: NewsReader.Com
X-Url: http://CurtWelch.Com/
Newsgroups: news.software.nntp