Thread View: news.software.nntp
5 messages
5 total messages
Started by J.B. Moreno
Wed, 25 Apr 2001 23:42
Groups with no current articles (was: Gravity and "reset article numbers")
Author: J.B. Moreno
Date: Wed, 25 Apr 2001 23:42
Date: Wed, 25 Apr 2001 23:42
48 lines
3751 bytes
3751 bytes
(I'm adding in news.software.nntp and setting followups to nsr and nsn) Josef Drexler <nospam0401@josefsbox.cjb.net> wrote: > Sorry, J.B. Moreno, could you repeat that? I wasn't paying attention: > > Josef Drexler <nospam0401@josefsbox.cjb.net> wrote: -snip on group with no articles- > >> However, "group local.test" returns > >> 211 0 0 0 local.test > >> > >> This does suggest that the article numbers have been reset to 0. Very > >> interesting. The question now is, is this a problem with my news server or > >> is it a bug in Gravity. I mean, is this result to be expected for an empty > >> group that used to have articles? > > > > No, I'd expect something like: > > 211 15 15 0 local.test > > > > Unless this is an undocumented convention that I am unaware of (or I > > somehow missed it) I'd consider this a server bug. > > It is not defined in the NNTP RFC. RFC977 simply states that it should > return the numbers of the first and last articles, and an estimate of how > many articles there are. If there are no articles, there is no first or > last one, and these numbers would be undefined. IMO this is incorrect -- last is the highest number so far, not the highest number available (cancels for instance). > According to http://www.academ.com/academ/nntp/ietf/0412.html, the current > NNTP reference implementation reports "0" for first and last articles in > this case, even though this is not the best option, and future NNTP specs > might forbid it. > > So, reporting "211 0 0 0 local.test" is neither against the RFC nor against > common practise as it seems, but unfortunately it breaks Gravity. > > Still, I'm going to hunt for an INN option or patch that changes this > behaviour at least on my machine, so that Gravity will stop complaining. The article you pointed to above seems to imply that INN should return just what I would have expected (first=last, count=0). Of course INN has changed since then, but I wonder why it would have changed this. -- JBM "Your depression will be added to my own" -- Marvin of Borg
Re: Groups with no current articles (was: Gravity and "reset article numbers")
Author: Josef Drexler
Date: Thu, 26 Apr 2001 16:10
Date: Thu, 26 Apr 2001 16:10
54 lines
4051 bytes
4051 bytes
Sorry, J.B. Moreno, could you repeat that? I wasn't paying attention: > (I'm adding in news.software.nntp and setting followups to nsr and nsn) > > Josef Drexler <nospam0401@josefsbox.cjb.net> wrote: > >> Sorry, J.B. Moreno, could you repeat that? I wasn't paying attention: >> > Josef Drexler <nospam0401@josefsbox.cjb.net> wrote: > -snip on group with no articles- >> >> However, "group local.test" returns >> >> 211 0 0 0 local.test >> >> >> >> This does suggest that the article numbers have been reset to 0. Very >> >> interesting. The question now is, is this a problem with my news server or >> >> is it a bug in Gravity. I mean, is this result to be expected for an empty >> >> group that used to have articles? >> > >> > No, I'd expect something like: >> > 211 15 15 0 local.test >> > >> > Unless this is an undocumented convention that I am unaware of (or I >> > somehow missed it) I'd consider this a server bug. >> >> It is not defined in the NNTP RFC. RFC977 simply states that it should >> return the numbers of the first and last articles, and an estimate of how >> many articles there are. If there are no articles, there is no first or >> last one, and these numbers would be undefined. > > IMO this is incorrect -- last is the highest number so far, not the > highest number available (cancels for instance). It may be incorrect, but that's not how the RFC states it: [GROUP command] "The successful selection response will return the article numbers of the first and last articles in the group, and an estimate of the number of articles on file in the group." It doesn't say what it should return if there are no articles in the group, when there is no first or last article. I agree that it should not return zero, but if it does it still doesn't violate the RFC. The NNTP reference implementation apparently looks at the spool directory and finds out what the highest and lowest article are, and how many there are. This would return low=high=count=0 too. I'm not sure what INN does exactly, but it must be something similar. -- Josef Drexler | http://publish.uwo.ca/~jdrexler/ ---------------------------------+---------------------------------------- Please help Conserve Gravity | Email address is *valid*. Boycott multistory buildings. | Don't remove the "nospam" part.
Re: Groups with no current articles
Author: J.B. Moreno
Date: Thu, 26 Apr 2001 21:37
Date: Thu, 26 Apr 2001 21:37
41 lines
3109 bytes
3109 bytes
In article <9c9h98$l81$1@panther.uwo.ca>, Josef Drexler <nospam0401@josefsbox.cjb.net> wrote: > Sorry, J.B. Moreno, could you repeat that? I wasn't paying attention: > > (I'm adding in news.software.nntp and setting followups to nsr and nsn) > > -snip GROUP returning 0 0 0 group.name for group with no active articles- > > IMO this is incorrect -- last is the highest number so far, not the > > highest number available (cancels for instance). > > It may be incorrect, but that's not how the RFC states it: > > [GROUP command] > "The successful selection response will return the article numbers of > the first and last articles in the group, and an estimate of the > number of articles on file in the group." > > It doesn't say what it should return if there are no articles in the group, > when there is no first or last article. > > I agree that it should not return zero, but if it does it still doesn't > violate the RFC. Oh, I agree that is a possible, maybe even valid, interpretation of what the RFC says, I just think the idea is silly. Setting it to zero seems exactly the wrong thing to do, as the high mark is often used for checking for new articles, I don't see any benefit to setting it (unlike the estimated number of articles) to zero. > The NNTP reference implementation apparently looks at the spool > directory and finds out what the highest and lowest article are, and > how many there are. This would return low=high=count=0 too. I'm not > sure what INN does exactly, but it must be something similar. I'm not familiar with the innards of INN either, hopefully someone that is will pipe up. -- J.B. Moreno
Re: Groups with no current articles
Author: Jeffrey M. Vinocur
Date: Thu, 26 Apr 2001 21:46
Date: Thu, 26 Apr 2001 21:46
37 lines
2483 bytes
2483 bytes
In article <260420011737480833%planb@newsreaders.com>,
J.B. Moreno <planb@newsreaders.com> wrote:
>In article <9c9h98$l81$1@panther.uwo.ca>, Josef Drexler
><nospam0401@josefsbox.cjb.net> wrote:
>
>> The NNTP reference implementation apparently looks at the spool
>> directory and finds out what the highest and lowest article are, and
>> how many there are. This would return low=high=count=0 too. I'm not
>> sure what INN does exactly, but it must be something similar.
>
>I'm not familiar with the innards of INN either, hopefully someone that
>is will pipe up.
Here's the bit of code from nnrpd/group.c in INN, where
NNTP_GROUPOK_VAL is a constant for the status code (211):
if (count == 0)
Reply("%d 0 0 0 %s\r\n", NNTP_GROUPOK_VAL, group);
else
Reply("%d %d %ld %ld %s\r\n",
NNTP_GROUPOK_VAL,
count, ARTlow, ARThigh, group);
That is, it purposefully special-cases for empty groups and
returns 0 0 0 instead of N N 0. I don't know why, however. I'd
be curious if anyone has source for nnrpd from long ago...
For whoever wanted to patch INN, it would be trivial (delete the
first three lines above and recompile nnrpd) --- but I wonder if
any software depends on that behavior.
--
Jeffrey M. Vinocur
jeff@litech.org
Re: Groups with no current articles
Author: those who know me have no need o...
Date: Fri, 27 Apr 2001 10:13
Date: Fri, 27 Apr 2001 10:13
31 lines
1952 bytes
1952 bytes
<9ca4vt$7d4$1@marduk.litech.org> divulged:
>That is, it purposefully special-cases for empty groups and
>returns 0 0 0 instead of N N 0. I don't know why, however. I'd
>be curious if anyone has source for nnrpd from long ago...
isc has them all.
nnrpd.c version 1.0:
if (ARTsize == 0)
Reply("%d 0 0 0 %s\r\n", NNTP_GROUPOK_VAL, group);
else
Reply("%d %d %d %d %s\r\n",
NNTP_GROUPOK_VAL,
ARTsize, ARTnumbers[0], ARTnumbers[ARTsize - 1], group);
reference nntp (1.5.12.1) [trimmed somewhat]:
num_arts = scan_dir(low_msg, high_msg);
/* [...] */
printf("%d %d %d %d %s\r\n",
OK_GROUP,
num_arts,
(num_arts > 0 ? art_array[0] : 0),
(num_arts > 0 ? art_array[num_arts-1] : 0),
argv[1]);
--
okay, have a sig then
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads