[NNTP] Article Numbers Becoming Invalid (RFC 3977)

Russ Allbery rra at stanford.edu
Fri Jan 1 11:13:04 PST 2010


Julien ÉLIE <julien at trigofacile.com> writes:

> It is the same thing that happens when you send a GROUP command and the
> first valid article in the newsgroup is not the reported low water mark.
> The article pointer points to the reported low water mark, and is
> therefore invalid.

This shouldn't happen.  GROUP is supposed to find the first valid article
on entry.  (The article may become invalid later, of course.)  You should
only ever get an invalid article number immediately after GROUP if the
group is actually empty.

> One interesting thing I have just discovered is that the NNTP reference
> implementation returns the FIRST VALID ARTICLE when
> ARTICLE/BODY/HEAD/STAT is sent!

> From nntp-1.5.12.1:

>        while (open_valid_art(artbuf, art_id) == NULL) {
>                if (argc > 1) {
>                        printf("%d Invalid article number: %s.\r\n",
>                                ERR_NOARTIG, artbuf);
>                        (void) fflush(stdout);
>                        return;
>                } else {
>                        if (++art_ptr >= num_arts) {
>                                printf("%d Invalid article number.\r\n",
>                                        ERR_NOARTIG);
>                                (void) fflush(stdout);
>                                return;
>                        }
>                        (void) sprintf(artbuf, "%d", art_array[art_ptr]);
>                }
>        }

> Note the ++art_ptr, and while it does not exceed the high water mark,
> it will grow until an article is found!

That's intriguing.

> Is it how the NNTP protocol is supposed to work?
> If that's the case, then RFC 3977 should be amended to mention that...

Well, it isn't what we standardized, so changing it would require changing
the protocol.  I suspect that at this point it's better to go with what we
standardized, even if that means that reference NNTP isn't compatible in
that one case.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>


More information about the ietf-nntp mailing list