[NNTP] Suggestion of examples for 412 semantics in RFC 3977

Julien ÉLIE julien at trigofacile.com
Tue Feb 15 11:56:04 PST 2011


Just a few examples that could be added to RFC 3977.

Following a discussion with Alfred Hönes, who reported:

> (iv)  particulars of the 412 semantics
> 
> The LISTGROUP Usage (Section 6.1.2.1, on page 39) contains the note:
> 
>     [1] The 412 response can only occur if no group has been specified.
> 
> The LISTGROUP Description (Section 6.1.2.2, on mid-page 40) says:
> 
>     The LISTGROUP command selects a newsgroup in the same manner as the
>     GROUP command (see Section 6.1.1) but also provides a list of article
>     numbers in the newsgroup.  If no group is specified, the currently
>     selected newsgroup is used.
> 
> |  If the group specified is not available on the server, a 411 response
> |  MUST be returned.  If no group is specified and the currently
> |  selected newsgroup is invalid, a 412 response MUST be returned.
> 
> The second paragraph quoted could be interpreted to say, using the
> notation proposed above:
> 
>     If the group specified is not available on the server, a 411 response
> |  MUST be returned.  If no group is specified and the currently
> |  selected newsgroup is `invalid`, a 412 response MUST be returned.
> 
> And in this interpretation, it would have to be presumed that when
> (no group is specified and) the "currently selected newsgroup" has
> became lame (unavailable on the server), a 411 response should be
> returned as well.
> (Unfortunately, this case is not covered by any example in the RFC.)

Interesting scenario.
Here is what INN 2.5 answers:

[No trigofacile.abc group]

LISTGROUP trigofacile.abc
411 No such group trigofacile.abc

[I create the group]

LISTGROUP trigofacile.abc
211 0 1 0 trigofacile.abc
.

[I remove the group]

LISTGROUP
411 No such group trigofacile.abc
LISTGROUP trigofacile.abc
411 No such group trigofacile.abc
OVER
420 Current article number 0 is invalid
XOVER
420 Current article number 0 is invalid
OVER 1
423 No articles in 1
XOVER 1
224 No articles in 1
.

[I recreate the group]

LISTGROUP
211 0 1 0 trigofacile.abc
.



As far as I can see, when the group is selected, we are inside
it, with article number set to the first article (here, it is
empty, so the article number is 0 -- but it could have been 7
or any other number).

I think the behaviour is consistent.
Not available => 411
412 would be for an invalid currently selected newsgroup.  Yet,
the currently selected newsgroup is valid (the notion does not
deal with existing/not existing at one moment -- the currently
selected newsgroup does not become invalid if the newsgroup
disappears from the LIST ACTIVE result).

No interpretation here.  No quote around "invalid".





> Otherwise, that second paragraph could be interpreted as meaning
> (formulated verbously):
> 
>     If the group specified is not available on the server, a 411 response
> |  MUST be returned.  If no group is specified and the currently
> |  selected newsgroup is `invalid` (has never been set) or it has become
> |  unavalable on the server, a 412 response MUST be returned.
> 
> I conclude that the former interpretation must have been intended
> since the latter interpretation does not match the specified 412
>     Meaning: no newsgroup selected.

Yes.  That is not a valid interpretation.  There is no interpretation
to give to the word "invalid".  It means only one thing when it is
used for the currently selected newsgroup/article.





> The LAST Description (Section 6.1.3.2, page 42), and hence implicitely,
> by reference, the NEXT Description (Section 6.1.4.2,page 44) contains
> the sentence,
>                                                  [...].  If the currently
>     selected newsgroup is invalid, a 412 response MUST be returned.  [...]
> 
> According to (iii) above, this apparently should be interpreted to mean:
> 
>                                                         If the "currently
>     selected newsgroup" is `invalid`, a 412 response MUST be returned.
> 
> Again, it remains unclear what should be done when the "currently
> selected newsgroup" has become lame.
> All other response codes specified in the Usage clauses for LAST
> and NEXT are not appropriate for this case.  The solution proposed
> for LISTGROUP hence is not applicable; a gap in the specification
> remains.

Yes!
It is erratum 2003 (which I mentioned at the beginning of this mail).
It is one of the annoying gaps in RFC 3977:

    http://www.rfc-editor.org/errata_search.php?eid=2003

Paragraph reworded as follows:

   If the currently selected newsgroup is invalid, a 412 response MUST
   be returned.  If the currently selected newsgroup is valid but the
   current article number is invalid, a 420 response MUST be returned.
   If the current article number is valid and there is no previous article
   in the currently selected newsgroup, a 422 response MUST be returned.
   In all three cases, the currently selected newsgroup and current article
   number MUST NOT be altered.


I believe the issue you mention is fixed.
The correct answer in your case is 420 if the newsgroup was empty,
and 422 if it was not.

Just to be sure, I have just checked in INN 2.5:

[Group with one article]

GROUP trigofacile.abc
211 1 1 1 trigofacile.abc
OVER
224 Overview information for 1 follows
1       test    [...]
.

[I remove the group]

LAST
422 No previous article to retrieve
NEXT
421 No next article to retrieve
OVER
423 No such article number 1



I think this behaviour is fine and RFC-with-errata-compliant.
Feel free to tell me if you reckon it is not the case.

-- 
Julien ÉLIE

« La science consiste à passer d'un étonnement à l'autre. »
  (Aristote)


More information about the ietf-nntp mailing list