This project has moved. For the latest updates, please go here.

Incorrect response to NEWGROUPS commands

May 30, 2010 at 1:43 PM

IF I send the command

NEWGROUPS 19900101 010101 GMT

I get the response

231 list of new newsgroups follows
503 program fault - command not performed System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.

There are several problems here.

1) This is a valid command (see RFC 39777) so should not produce an error.

2) The error is in parsing the arguments, so should be a 501 error, not a 503 - a 503 would only be valid if you recognised it used a 4 digit year form and didn't recognise it.

3) Multiple responses to a command are not permitted - strictly the 503 response is the first new newsgroup and the list lacks the terminating period.

 A similar problem occurs when a blank NEWGROUPS command is used, and in other cases -as I have seen 503 listed in the list of groups.

 Once you give the 231 response you are committed to sending the complete list of new groups - there is no way to signal a subsequent error condition. This probably means you also need to change when the 231 response is generated to after the long delay of searching for new groups.

May 30, 2010 at 3:26 PM
sagji wrote:

2) The error is in parsing the arguments, so should be a 501 error, not a 503 - a 503 would only be valid if you recognised it used a 4 digit year form and didn't recognise it.

Even in the last case, it would be 501.  Note that a news server MUST recognize the date with 2 or 4 digits.

503 has a different meaning in RFC 3977 and is not supposed to be used in other cases as those described in RFC 3977.
Also note that 503 means a different thing in (obsolete) RFC 977 -- which is the RFC the bridge is currently following.  It is now 400 (+ close the connection) or 403 with RFC 3977.

Julien ÉLIE