[NNTP] Article Numbers Becoming Invalid (RFC 3977)

Clive D.W. Feather clive at davros.org
Fri Jan 15 03:34:45 PST 2010


Julien LIE said:
> ARTICLE
> 220 100 <example at mid> article follows
> [...]
> 
> Suppose you wait for two minutes and the article is cancelled
> during that period, and you issue again the command:
> 
> ARTICLE
> 420 No current article selected

This is a corner case that we don't seem to have thought of.

If you used the explicit number:

    ARTICLE
    220 100 <example at mid> article follows
    (article 100 is deleted)
    ARTICLE 100
    423 No article with that number

it's clear that the correct response is 423.

> The article pointer has been made invalid (though it still points
> to 100).

No, the article pointer is still valid (the term "invalid article pointer"
has a special meaning.

In general, with commands like ARTICLE, the intent is that the form without
an argument is identical to the form with an argument, with the current
article number used as the argument.

So I would say that, in your example, 423 is the correct response. The 420
response is *only* for the case that you entered an empty group and
therefore GROUP wasn't able to assign an initial number.

Since 0 isn't a valid article number, you could think of "invalid article
pointer" as being "article number 0". Then:

    GROUP x.y
    211 5 100 104 x.y
    ARTICLE 100
    220 100 <example at mid> article follows
    (article 100 is deleted)
    ARTICLE
    (is equivalent to "ARTICLE 100")
    423 No article with that number

    GROUP p.q
    211 0 100 99 x.y
    (the article number is set to 0)
    ARTICLE
    (is equivalent to "ARTICLE 0")
    420 No current article selected

The wording at the end of 6.2.1.2 should say:

| If the argument is a number and that article does not
| exist in the currently selected newsgroup,
+ or the argument is omitted and the article with the
+ current article number does not exist in the currently
+ selected newsgroup (because it has been removed since
+ the current article number was set to it),
| a 423 response MUST be returned.

and the 423 response needs adding to the third form.

> 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.

This can't happen.

> 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!

This is absolutely and clearly wrong.

There's one problem with the wording of 3977. In 6.2.1.2 we wrote:

|  Note that a previously valid article number MAY become invalid if the
|  article has been removed.  A previously invalid article number MAY
|  become valid if the article has been reinstated, but this article
|  number MUST be no less than the reported low water mark for that
|  group.

This is misusing the term "invalid article number". The wording should have
been something like:

|  Note that a previously valid article number MAY cease to refer to any
|  article if that article has been removed, in which case use of that
|  article number (explicitly or implicitly) will cause a 423 response. A
|  previously removed article may be reinstated (but its number MUST be no
|  less than the reported low water mark for that group), in which case
|  that number will once again refer to that article.

[Julien on LAST]

>    If the current article number is already the first article of the
>    newsgroup, a 422 response MUST be returned.  If the current article
>    number is invalid, a 420 response MUST be returned.
>
> I think the last sentence should be "If the currently selected newsgroup
> is empty, a 420 response MUST be returned."

The problem with this is that there are two ways for a group to be empty.
(1) The group was empty on entry. The current article pointer should have
the special "invalid" value, and LAST et.al. return 420.
(2) All the articles in the group were deleted after we entered. In this
case, the correct response to LAST is 422, because the current article
pointer is a valid number.

Note that the client can, in principle, track the value of the current
article pointer:
- GROUP sets it to either the low water mark or "invalid".
- NEXT and LAST either return the new value, or the value remains
unchanged.
- ARTICLE et.al. with a numeric argument either set it to that value if
they succeed, or leave it unchanged if they fail.
- ARTICLE et.al. with a message-ID, or with no argument, never change it.

-- 
Clive D.W. Feather          | If you lie to the compiler,
Email: clive at davros.org     | it will get its revenge.
Web: http://www.davros.org  |   - Henry Spencer
Mobile: +44 7973 377646


More information about the ietf-nntp mailing list