Thread View: news.software.nntp
10 messages
10 total messages
Started by Pyro [Paranoid]
Tue, 30 Oct 2001 14:52
RFC 977 - Question 2...
Author: Pyro [Paranoid]
Date: Tue, 30 Oct 2001 14:52
Date: Tue, 30 Oct 2001 14:52
13 lines
1329 bytes
1329 bytes
Hello again, Another question regarding the protocol... RFC977 talks of a "STAT" command, im probably missing something but i dont understand its purpose, would anyone be so good as to enlighten me? Thanks again!!! PP
Re: RFC 977 - Question 2...
Author: Curt Welch
Date: Tue, 30 Oct 2001 15:54
Date: Tue, 30 Oct 2001 15:54
27 lines
2178 bytes
2178 bytes
"Pyro [Paranoid]" <pyro@wild-fire.dtdns.netNOSPAMCHEERSMUCKER> wrote: > Hello again, > > Another question regarding the protocol... > > RFC977 talks of a "STAT" command, im probably missing something but i > dont understand its purpose, would anyone be so good as to enlighten me? It's not used much. I can't say I've ever found a need for it in any code I've written though I do tend to use it by hand from time to time. It's a simple way to check to see if an article exists, and to get its message-id. You get an error code if the article you requested doesn't exist or you get a 223 response along with the message-id if it does exist. If you have a Message-ID and want to check if the article is on the server, stat is probably the best way to do that (assuming you don't want the rest of the head or body at the same time). But normally, programs will use other commands like XOVER or XHDR or LISTGROUP to figure out what articles numbers are valid. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Re: RFC 977 - Question 2...
Author: K. Ari Krupnikov
Date: Tue, 30 Oct 2001 19:21
Date: Tue, 30 Oct 2001 19:21
20 lines
1815 bytes
1815 bytes
"Pyro [Paranoid]" wrote: > > Hello again, > > Another question regarding the protocol... > > RFC977 talks of a "STAT" command, im probably missing something but i dont > understand its purpose, would anyone be so good as to enlighten me? You can select a newsgroup with the GROUP group.name command. If you then say ARTICLE (with no arguments), you'll get the first article in that group, and the "current article" will move to the next one, so when you say ARTICLE again, you'll get the second. STAT advances the "next article" counter without returning any text. It can be used to skip an article. Hope this helps. Ari.
Re: RFC 977 - Question 2...
Author: Curt Welch
Date: Tue, 30 Oct 2001 19:33
Date: Tue, 30 Oct 2001 19:33
27 lines
2244 bytes
2244 bytes
"K. Ari Krupnikov" <ari@cogsci.ed.ac.uk> wrote: > "Pyro [Paranoid]" wrote: > > > > Hello again, > > > > Another question regarding the protocol... > > > > RFC977 talks of a "STAT" command, im probably missing something but i > > dont understand its purpose, would anyone be so good as to enlighten > > me? > > You can select a newsgroup with the GROUP group.name command. If you > then say ARTICLE (with no arguments), you'll get the first article in > that group, and the "current article" will move to the next one, so when > you say ARTICLE again, you'll get the second. STAT advances the "next > article" counter without returning any text. It can be used to skip an > article. I think you are confusing the "next" command with "stat". stat will advance to the first article after selecting a group (though the behavior I believe is not correctly documented in the RFCs), but will not advance to the next article if an article is already selected. "next" will do that. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Re: RFC 977 - Question 2...
Author: Russ Allbery
Date: Tue, 30 Oct 2001 20:07
Date: Tue, 30 Oct 2001 20:07
19 lines
1741 bytes
1741 bytes
Curt Welch <curt@kcwc.com> writes:
> If you have a Message-ID and want to check if the article is on the
> server, stat is probably the best way to do that (assuming you don't
> want the rest of the head or body at the same time).
> But normally, programs will use other commands like XOVER or XHDR or
> LISTGROUP to figure out what articles numbers are valid.
HEAD and STAT has the advantage of being implemented on some transit-only
servers so that one can check whether one's peers have an article
(although even there I generally always use HEAD instead of STAT).
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: RFC 977 - Question 2...
Author: K. Ari Krupnikov
Date: Tue, 30 Oct 2001 21:20
Date: Tue, 30 Oct 2001 21:20
30 lines
2497 bytes
2497 bytes
Curt Welch wrote: > > "K. Ari Krupnikov" <ari@cogsci.ed.ac.uk> wrote: > > "Pyro [Paranoid]" wrote: > > > > > > Hello again, > > > > > > Another question regarding the protocol... > > > > > > RFC977 talks of a "STAT" command, im probably missing something but i > > > dont understand its purpose, would anyone be so good as to enlighten > > > me? > > > > You can select a newsgroup with the GROUP group.name command. If you > > then say ARTICLE (with no arguments), you'll get the first article in > > that group, and the "current article" will move to the next one, so when > > you say ARTICLE again, you'll get the second. STAT advances the "next > > article" counter without returning any text. It can be used to skip an > > article. > > I think you are confusing the "next" command with "stat". stat will > advance to the first article after selecting a group (though the behavior I > believe is not correctly documented in the RFCs), but will not advance to > the next article if an article is already selected. "next" will do that. You're right, it doesn't advance the counter. I guess STAT could be useful if you wanted to find the which article is current? Ari.
Re: RFC 977 - Question 2...
Author: Curt Welch
Date: Tue, 30 Oct 2001 21:48
Date: Tue, 30 Oct 2001 21:48
11 lines
1568 bytes
1568 bytes
"K. Ari Krupnikov" <ari@cogsci.ed.ac.uk> wrote: > You're right, it doesn't advance the counter. I guess STAT could be > useful if you wanted to find the which article is current? Good point. That's another thing it can be used for. But only the "telnet" newsreader is likely to take advantage of that. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Re: RFC 977 - Question 2...
Author: Greg Andrews
Date: Tue, 30 Oct 2001 23:28
Date: Tue, 30 Oct 2001 23:28
63 lines
3984 bytes
3984 bytes
"K. Ari Krupnikov" <ari@cogsci.ed.ac.uk> writes: > >You're right, it doesn't advance the counter. I guess STAT could be >useful if you wanted to find the which article is current? > Most of the confusion arises from two things. RFC 977 is a protocol, which means it's a toolbox for getting different (but related) kinds of work done. RFC 977 was also written 15 years ago, and Usenet has changed enormously since then. Some other commands have been suggested in this discussion (XOVER, XHDR, LISTGROUP), but they did not exist when RFC 977 was written. The RFC couldn't defer to commands that didn't exist, nor could it create superior ones. Also remember that threading newsreaders did not exist (or were in their infancy) at that time. So many of the commands and server behaviors described in RFC 977 were designed to support the news reading behavior at the time: reading each group's articles in numeric sequence. You can break RFC 977's commands into several categories. The two categories associated most directly with reading articles are the viewing commands (ARTICLE, HEAD, and BODY), and the article pointer manipulation commands (NEXT, LAST, and STAT). The viewing commands can be used with article identifiers, or without. Without identifiers, they rely on the server's current article pointer. A client that relies on the pointer would use STAT and NEXT to select the articles to view. STAT would be used at the start of reading a group, to skip the pointer past the articles that were already seen. After that, NEXT would be used to advance through the rest of the articles in the group. RFC 977 shows exactly this behavior in Section 4.1, Example 1. STAT can also be used to check whether an article exists on the server. An early threading newsreader might get the thread's message-ids from an article's References: header, and want to check whether the other articles exist. The client can use "STAT <message-id>" to verify they exist and which article numbers they have. The message-id form of STAT can also be a much lighter burden on the server than the ARTICLE, HEAD, or BODY commands. The server only needs to look the message-id up in its history database. It doesn't need to stat() the article file, open the file, and read it. Since RFC 977 was written, new techniques for reading articles have been implemented. Use of viewing commands without article identifiers has mostly gone away. Use of the pointer manipulation commands has gone with them. The key to understanding RFC 977 is to understand Usenet as it was 15 years ago. After that, you can decide which parts of the protocol are useful to today's newsreader and which are obsolete. -Greg -- +++++ Greg Andrews +++ gerg@panix.com +++++ I have a map of the United States that's actual size -- Steven Wright
Re: RFC 977 - Question 2...
Author: Kai Henningsen
Date: Fri, 02 Nov 2001 20:52
Date: Fri, 02 Nov 2001 20:52
30 lines
2252 bytes
2252 bytes
curt@kcwc.com (Curt Welch) wrote on 30.10.01 in <20011030105445.827$t7@newsreader.com>: > "Pyro [Paranoid]" <pyro@wild-fire.dtdns.netNOSPAMCHEERSMUCKER> wrote: > > Hello again, > > > > Another question regarding the protocol... > > > > RFC977 talks of a "STAT" command, im probably missing something but i > > dont understand its purpose, would anyone be so good as to enlighten me? > > It's not used much. I can't say I've ever found a need for it in any > code I've written though I do tend to use it by hand from time to time. Well I have. I have used it the same way I'd use seek() when working with files. It's the fastest way to make the "current article" pointer point to some article. Of course, it's usuall possible to redesign the algorithm to only do the pointing together with something else, and that's usually more efficient - but for a quick hack, this is sometimes useful. Also, you can use it to find out the msgid and number of the article under the pointer. Similar analysis as above. Kai -- http://www.westfalen.de/private/khms/ "... by God I *KNOW* what this network is for, and you can't have it." - Russ Allbery (rra@stanford.edu)
Re: RFC 977 - Question 2...
Author: The Archiver
Date: Sat, 03 Nov 2001 08:32
Date: Sat, 03 Nov 2001 08:32
18 lines
1303 bytes
1303 bytes
"Pyro [Paranoid]" <pyro@wild-fire.dtdns.netNOSPAMCHEERSMUCKER> wrote: >Another question regarding the protocol... > >RFC977 talks of a "STAT" command, im probably missing something but i dont >understand its purpose, would anyone be so good as to enlighten me? I'm always using the STAT command in MyNews to check if an article is already on the server before I post an article upstream. This is great if the sending of articles was stopped by any mistakes. It allows to determine if the host has already accepted the article without sending it completely again. -- The Archiver
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