[NNTP] Article Numbers Becoming Invalid (RFC 3977)

Russ Allbery rra at stanford.edu
Thu Dec 31 00:27:09 PST 2009


Sabahattin Gucukoglu <mail at sabahattin-gucukoglu.com> writes:

> Right, this is fine.  But the question was really, how do I initialise
> the pointer to something not the beginning of the group?

ARTICLE <number> or STAT <number>.

> I cannot use NEXT until I hit on a valid article.  Does this not mean
> that I will have to find it by trial and error with article numbers?

Trial and error is an odd way to describe it, since that sounds like
you're trying article numbers at random.  You start with one greater than
the last article that you read and try each number in sequence from there
to the high-water mark until you get a successful reply.  From that point
forward, you can use NEXT.  (This is, in essence, what NEXT does
internally in the server.)

Note that if you don't want to retrieve the article automatically, just
simulate what NEXT would do by selecting it, you can use STAT instead.

> So, I want to retrieve articles beginning from 1000 in example.group.  I
> would do:

> GROUP example.group
> ARTICLE 1000
> ARTICLE 1001
> ...
> until I get a working article (not 423)
> and then I can proceed to use NEXT.

Correct.

> A coinciding question: if I use the ARTICLE command specifying an
> invalid article number, has the state of the server changed so that NEXT
> will now no longer work, or will it work as it did before I issued
> ARTICLE, assuming a valid article before (as on GROUP)?

   The server MUST NOT change the current article number except when an
   article number argument was provided and the article exists; in
   particular, it MUST NOT change it following an unsuccessful response.

Nothing about an unsuccessful ARTICLE command changes state in the server,
so if NEXT was working beforehand, it's still working afterwards.

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


More information about the ietf-nntp mailing list