🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
5 messages
5 total messages Started by Nolan Sat, 04 Dec 1999 00:00
Detecting Binary Attachments
#54860
Author: Nolan
Date: Sat, 04 Dec 1999 00:00
32 lines
1810 bytes
QUESTION:

I have been playing around with the NNTP protocol some and 
there are 2 things that I have yet to figure out.

1. How do you know if an article has a uuencoded binary 
	attachment? I assumed that there would be a header
	field to indicate this, but that doesn't appear to
	be the case.

2. When a large binary attachment is split into multiple
	articles, how do you determine which articles are
	needed to re-assemble the complete attachment?

Is there a public domain or freeware library that I can
call to download a binary attachment for a given article?
I'd like to be able to pass an article ID to a function
and have that function download and decode the binary
attachment if the entire attachement is included in that
message.  If the attachment spans multiple articles, I'd
like the function (or another one) to have the ability
to determine which articles are needed to decode the
attachment and then download all the needed articles and
decode the attachment.  DOES THIS EXIST?

If not, is there a VERY SIMPLE news reader with source
code that implements those 2 pieces of functionality?

Thanks,
Nw

Re: Detecting Binary Attachments
#54873
Author: Curt Welch
Date: Sat, 04 Dec 1999 00:00
56 lines
2880 bytes
nolanw@iglou.com (Nolan) wrote:
> QUESTION:
>
> I have been playing around with the NNTP protocol some and
> there are 2 things that I have yet to figure out.
>
> 1. How do you know if an article has a uuencoded binary
>         attachment? I assumed that there would be a header
>         field to indicate this, but that doesn't appear to
>         be the case.

No header.  You have to read the article and look for the begin
line.

But then there's Mime encoded articles as well.  Much more complex.
Takes lots of code to do a good job on all the various formats people
might use on Usenet.

> 2. When a large binary attachment is split into multiple
>         articles, how do you determine which articles are
>         needed to re-assemble the complete attachment?

A lot of magic.  No simple solutions.  Mime has a multipart standard
but very view articles posted to Usenet use it.  In general, you match
up parts by looking at the subject and author.  Some newsreaders don't
even try.  They just let the user find and hightlight all the parts.

> Is there a public domain or freeware library that I can
> call to download a binary attachment for a given article?

Not that I know of, but who knows.

> I'd like to be able to pass an article ID to a function
> and have that function download and decode the binary
> attachment if the entire attachement is included in that
> message.

You know articles can have multiple attachments as well though
it's not very common.

> If the attachment spans multiple articles, I'd
> like the function (or another one) to have the ability
> to determine which articles are needed to decode the
> attachment and then download all the needed articles and
> decode the attachment.  DOES THIS EXIST?
>
> If not, is there a VERY SIMPLE news reader with source
> code that implements those 2 pieces of functionality?

Can't help you there.  I just wrote all my own code.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/

Re: Detecting Binary Attachments
#54899
Author: jason
Date: Sun, 05 Dec 1999 00:00
24 lines
1471 bytes
Nolan <nolanw@iglou.com> wrote:
> 1. How do you know if an article has a uuencoded binary 
> 	attachment? I assumed that there would be a header

You can't. You have to parse it.

> 2. When a large binary attachment is split into multiple
> 	articles, how do you determine which articles are

You can't. You have to issue an XHDR subject command and
try to match up the subject lines.

> Is there a public domain or freeware library that I can
> call to download a binary attachment for a given article?

libuu which is part of uudeview (and also delivered with KDE)
is good at the 'decode-anything-binary' part, but I can't comment
on multi-part functionality.

Hope this helps,

Jason.

Re: Detecting Binary Attachments
#54918
Author: I R A Darth Aggie
Date: Mon, 06 Dec 1999 00:00
16 lines
1182 bytes
On Mon, 06 Dec 1999 16:37:42 GMT, Roberto Alsina <ralsina@my-deja.com>, in
<82goom$inr$1@nnrp1.deja.com> wrote:

+ It is quite good, as long as you feed it all the parts.

Gosh, I wonder why that might be?? ;) ;)

James - the wording struck me as being very humorous...

-- 
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html>

Re: Detecting Binary Attachments
#54924
Author: Roberto Alsina
Date: Mon, 06 Dec 1999 00:00
33 lines
1952 bytes
In article <82ddv0$4q4$1@supernews.com>,
  jason@radar.tele3.co.uk wrote:
> Nolan <nolanw@iglou.com> wrote:
> > 1. How do you know if an article has a uuencoded binary
> > 	attachment? I assumed that there would be a header
>
> You can't. You have to parse it.
>
> > 2. When a large binary attachment is split into multiple
> > 	articles, how do you determine which articles are
>
> You can't. You have to issue an XHDR subject command and
> try to match up the subject lines.
>
> > Is there a public domain or freeware library that I can
> > call to download a binary attachment for a given article?
>
> libuu which is part of uudeview (and also delivered with KDE)
> is good at the 'decode-anything-binary' part, but I can't comment
> on multi-part functionality.

It is quite good, as long as you feed it all the parts.
It will even attempt to decode if you feed it the beginning of the
file (say, parts 1/6 and 2/6 will produce a third of a file).

--
Roberto Alsina (KDE developer, MFCH)


Sent via Deja.com http://www.deja.com/
Before you buy.

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