Article View: news.software.nntp
Article #64062Re: Suggestings for NNTP command with attachment app
From: Jeremy
Date: Mon, 17 Feb 2003 06:20
Date: Mon, 17 Feb 2003 06:20
56 lines
3006 bytes
3006 bytes
Tom <webview@rcn.com> wrote: > I am looking for suggestions on the best way to implement a binary news > grabber (and Usenet reader). I read through RFC 977 which gave me a lot of > questions as how to best implement my commands. That's not surprising; 977 is very old, and doesn't include all of what we currently know as "NNTP". > To read a messsage: > ------------------ > GROUP <groupname> > ARTICLE <articleid> You don't have to do GROUP for every article. You proably know that, but I just wanted to make sure. > To locate all the posts with binary attachments: > ------------------------------------------------ > GROUP <groupname> > STAT <articleid> > HEAD > > I would then process the results of the HEAD command looking for mime types, > etc. No. One of the things that's not in 977 is XOVER, which is what you want. You do one command and get back a list of a range of articles and the content of certain headers in them. Have a look at RFC 2980. However, you can't look for MIME types; almost no one posts binaries with MIME. Unfortunately, the way they are posted, you really have to use a lot of guesswork based on experience, especially when you're looking for multipart binaries. > Also, on some binary "grabbers", there are options like "read nn number of > lines to determine if post is binary", where nn is a number that can be > entered (usually defaulting to 50). > > I am assuming that this is the first nn lines of the body. Would that mean > the grabber is getting the entire post in a group (unless there is a way to > get the first nn lines of an article)? Getting every post would effectively > mean it is downloading all the binaries in the group, which is not the case. The only way to do that would be to tear down the connection after reading the desired number of lines, and then re-open a new connection. There is no way to abort a transfer in progress. Dropping connections a lot is a bad idea, because the server may not keep up and you may hit a connection limit on the server side. -- Jeremy | jeremy@exit109.com
Technical Details
Message-ID:
<1045462847.777964@ok-corral.gunslinger.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!saloon!newsbastardReferences:
<G_acnQL_QMldWtKjXTWcoQ@giganews.com>Show Full Headers
Complete Article Headers
Message-ID: <1045462847.777964@ok-corral.gunslinger.net> Subject: Re: Suggestings for NNTP command with attachment app Date: Mon, 17 Feb 2003 06:20:47 +0000 From: Jeremy <jeremy@exit109.com> References: <G_acnQL_QMldWtKjXTWcoQ@giganews.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!saloon!newsbastard Newsgroups: news.software.nntp Organization: There Is No Organization Lines: 55 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: trn 4.0-test76 (Apr 2, 2001) X-Meow: Meow