Thread View: news.software.nntp
12 messages
12 total messages
Started by Gord
Mon, 01 Mar 2004 21:37
NNTP Programming question - Multi part messages
Author: Gord
Date: Mon, 01 Mar 2004 21:37
Date: Mon, 01 Mar 2004 21:37
16 lines
1524 bytes
1524 bytes
Hi group I am doing some NNTP programming and I'm having difficulty with a section that tries to find multi part messages. If someone posts a large file, whether it is MP3 or MPEG or whatever it seems we are at the mercy of a non standard subject line in trying to find all the pieces to join together. Am I missing an obvious solution to this. Is there any way to easily find all the parts of a multi part message? All help appreciated. TIA Gord
Re: NNTP Programming question - Multi part messages
Author: Russ Allbery
Date: Mon, 01 Mar 2004 21:49
Date: Mon, 01 Mar 2004 21:49
22 lines
2016 bytes
2016 bytes
Gord <gord_muir@nospam_hotmail.com> writes:
> I am doing some NNTP programming and I'm having difficulty with a
> section that tries to find multi part messages.
> If someone posts a large file, whether it is MP3 or MPEG or whatever
> it seems we are at the mercy of a non standard subject line in trying
> to find all the pieces to join together.
Yup.
> Am I missing an obvious solution to this. Is there any way to easily
> find all the parts of a multi part message?
There is, unfortunately, no standard for doing this that is used widely on
Usenet. All the code I know of that does this does subject line guessing.
--
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: NNTP Programming question - Multi part messages
Author: DS
Date: Mon, 01 Mar 2004 22:57
Date: Mon, 01 Mar 2004 22:57
31 lines
2337 bytes
2337 bytes
Gord <gord_muir@nospam_hotmail.com> wrote in news:n3b740p7nioh4h8c89crsbu05risnmf9hb@4ax.com: > Hi group > > I am doing some NNTP programming and I'm having difficulty with a > section that tries to find multi part messages. > > If someone posts a large file, whether it is MP3 or MPEG or whatever > it seems we are at the mercy of a non standard subject line in trying > to find all the pieces to join together. > > Am I missing an obvious solution to this. Is there any way to easily > find all the parts of a multi part message? > > All help appreciated. > > TIA > Gord Gord, E-mail at the above address (with all but one of the double dots removed) if you want to discuss this issue further. I spent 3 months doing mpart detection in my client and had the same question you asked. Now if XBin...... Regards, DS
Re: NNTP Programming question - Multi part messages
Author: Gord
Date: Thu, 04 Mar 2004 17:40
Date: Thu, 04 Mar 2004 17:40
43 lines
2225 bytes
2225 bytes
Hello DS I replied to your email address but have not heard back. TIA Gord On 1 Mar 2004 16:57:40 -0600, DS <t.h.i.s.n.t.h.a.t@a.d.e.l.p.h.i.a..n.e.t> wrote: >Gord <gord_muir@nospam_hotmail.com> wrote in >news:n3b740p7nioh4h8c89crsbu05risnmf9hb@4ax.com: > >> Hi group >> >> I am doing some NNTP programming and I'm having difficulty with a >> section that tries to find multi part messages. >> >> If someone posts a large file, whether it is MP3 or MPEG or whatever >> it seems we are at the mercy of a non standard subject line in trying >> to find all the pieces to join together. >> >> Am I missing an obvious solution to this. Is there any way to easily >> find all the parts of a multi part message? >> >> All help appreciated. >> >> TIA >> Gord > >Gord, > >E-mail at the above address (with all but one of the double dots removed) >if you want to discuss this issue further. I spent 3 months doing mpart >detection in my client and had the same question you asked. > >Now if XBin...... > >Regards, > >DS
Re: NNTP Programming question - Multi part messages
Author: Gord
Date: Thu, 04 Mar 2004 17:42
Date: Thu, 04 Mar 2004 17:42
29 lines
2186 bytes
2186 bytes
Ok if we're stuck with subject line guessing thats too bad... but, has anyone come up with a decent regular expresssion or algorithm to aid with this? I saw a FAQ on an MP3 group the other day urging people to not use the (99/99) standard. Man that would give me headaches. Gord On Mon, 01 Mar 2004 13:49:40 -0800, Russ Allbery <rra@stanford.edu> wrote: >Gord <gord_muir@nospam_hotmail.com> writes: > >> I am doing some NNTP programming and I'm having difficulty with a >> section that tries to find multi part messages. > >> If someone posts a large file, whether it is MP3 or MPEG or whatever >> it seems we are at the mercy of a non standard subject line in trying >> to find all the pieces to join together. > >Yup. > >> Am I missing an obvious solution to this. Is there any way to easily >> find all the parts of a multi part message? > >There is, unfortunately, no standard for doing this that is used widely on >Usenet. All the code I know of that does this does subject line guessing.
Re: NNTP Programming question - Multi part messages
Author: Curt Welch
Date: Thu, 04 Mar 2004 20:44
Date: Thu, 04 Mar 2004 20:44
50 lines
3335 bytes
3335 bytes
Gord <gord_muir@nospam_hotmail.com> wrote: > Ok if we're stuck with subject line guessing thats too bad... but, has > anyone come up with a decent regular expresssion or algorithm to aid > with this? Everyone that has attempted to automaticaly identify multipart posts has done it. The problem is that there's no simply way to do it and get it right all the time. So you have to add various special cases acceptions to try and prevent as many errors as possible. And over time, you have to keep adjusting your code if you want it to work well to deal with changing posting habits and tools. The simple way of doing it fairly trivial. You just sort the subjects and assume that a multiplart post will correctly sort together in the list and that the last NNN/NNN string in the subject is the one to use when matching up parts. Just donig that gets a very large percentage of posts correctly identified. How much more than that you want to do determines how many times your code matches things up correctly and how many times it failes. If the same file is posted twice, with the same subject, but with a different size per article which makes the total number of parts different in the two posts, the above technique will fail because the parts won't sort together correctly. If someone adds an extra NN/NN to the end of the subject, like: part3 (01/10) file 3/5 part3 (02/10) file 3/5 The above will fail because to match up the parts you have to use the first NN/NN instead of the last. If they fail to zero pad the first number in the NN/NN pair, the subjects won't sort into the correct order. If there is a partial post, which failed, and then a full repost, you will get extra parts, which could confuse simple-minded code. If someone intentionally tries to corrupt a post by posting forged parts, simple part matching code is likely to be tricked into grabbing some of the wrong parts. These are all things that you can make work correctly (most the time) with "smarter" code. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
yEnc decoding question
Author: Gord
Date: Thu, 11 Mar 2004 22:03
Date: Thu, 11 Mar 2004 22:03
24 lines
1886 bytes
1886 bytes
Hi all Thanks to Curt I have greatly improved the filtering of Usenet messages going into my database. I'm currently working on yEnc decoding of multi part binaries and have run into a snag. At first I simply wrote the information into a text file and attempted to decode that. Treating binary information as text doesn't work too well and I've switched to simply grabbing the bytes as they come in and doing a binary write out to a single text file. Now all the information is correctly in the text file but there appear to be control characters messing with the formatting. All the information appears to be tabbed and there are many broken lines. Anyone have experience dealing with this? Any and all help appreciated. TIA Gord
Re: yEnc decoding question
Author: Curt Welch
Date: Sat, 13 Mar 2004 05:09
Date: Sat, 13 Mar 2004 05:09
33 lines
2622 bytes
2622 bytes
Gord <gord_muir@nospam_hotmail.com> wrote: > Hi all > > Thanks to Curt I have greatly improved the filtering of Usenet > messages going into my database. > > I'm currently working on yEnc decoding of multi part binaries and have > run into a snag. > > At first I simply wrote the information into a text file and attempted > to decode that. Treating binary information as text doesn't work too > well and I've switched to simply grabbing the bytes as they come in > and doing a binary write out to a single text file. > > Now all the information is correctly in the text file but there appear > to be control characters messing with the formatting. All the > information appears to be tabbed and there are many broken lines. > > Anyone have experience dealing with this? yEnc files are almost pure binary. Don't try to look at them, it will hurt your eyes. :) If you write a program to decode the data, you don't need to "see" the text file. But, as you said, if you use read and write routines that think they are working with a text file, it might corrupt the data. You need to treat a yEnc article as if it were a pure binary file. They just aren't as easy to work with as uuencode articles because of this fact. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Re: yEnc decoding question
Author: Gord
Date: Wed, 17 Mar 2004 19:42
Date: Wed, 17 Mar 2004 19:42
44 lines
2936 bytes
2936 bytes
It turned out that the problem was null terminated strings. I had to manually look for nulls and not write them. Now i'm playing with WILDMAT command. Can anyone tell me how to match a fragment? It should be easy but I can't see it yet. I want to match 'ogg'. Using *ogg* doesn't work. TIA Gord On 13 Mar 2004 05:09:57 GMT, curt@kcwc.com (Curt Welch) wrote: >Gord <gord_muir@nospam_hotmail.com> wrote: >> Hi all >> >> Thanks to Curt I have greatly improved the filtering of Usenet >> messages going into my database. >> >> I'm currently working on yEnc decoding of multi part binaries and have >> run into a snag. >> >> At first I simply wrote the information into a text file and attempted >> to decode that. Treating binary information as text doesn't work too >> well and I've switched to simply grabbing the bytes as they come in >> and doing a binary write out to a single text file. >> >> Now all the information is correctly in the text file but there appear >> to be control characters messing with the formatting. All the >> information appears to be tabbed and there are many broken lines. >> >> Anyone have experience dealing with this? > >yEnc files are almost pure binary. Don't try to look at them, it will hurt >your eyes. :) > >If you write a program to decode the data, you don't need to "see" the text >file. But, as you said, if you use read and write routines that think they >are working with a text file, it might corrupt the data. You need to treat >a yEnc article as if it were a pure binary file. They just aren't as easy >to work with as uuencode articles because of this fact.
Re: NNTP Programming question - Multi part messages
Author: Bill Davidsen
Date: Thu, 18 Mar 2004 19:40
Date: Thu, 18 Mar 2004 19:40
45 lines
2946 bytes
2946 bytes
Gord wrote:
> Ok if we're stuck with subject line guessing thats too bad... but, has
> anyone come up with a decent regular expresssion or algorithm to aid
> with this?
>
> I saw a FAQ on an MP3 group the other day urging people to not use the
> (99/99) standard. Man that would give me headaches.
>
> Gord
>
> On Mon, 01 Mar 2004 13:49:40 -0800, Russ Allbery <rra@stanford.edu>
> wrote:
>
>
>>Gord <gord_muir@nospam_hotmail.com> writes:
>>
>>
>>>I am doing some NNTP programming and I'm having difficulty with a
>>>section that tries to find multi part messages.
>>
>>>If someone posts a large file, whether it is MP3 or MPEG or whatever
>>>it seems we are at the mercy of a non standard subject line in trying
>>>to find all the pieces to join together.
>>
>>Yup.
>>
>>
>>>Am I missing an obvious solution to this. Is there any way to easily
>>>find all the parts of a multi part message?
>>
>>There is, unfortunately, no standard for doing this that is used widely on
>>Usenet. All the code I know of that does this does subject line guessing.
Something like:
if (m!^Subject: .*[[(](\d+/\d+)[])]!) {
($part, $Nparts) = split("/", $1);
# or some such
}
--
bill davidsen (davidsen@darkstar.prodigy.com)
SBC/Prodigy Yorktown Heights NY data center
Project Leader, USENET news
http://newsgroups.news.prodigy.com
Re: yEnc decoding question
Author: Bill Davidsen
Date: Thu, 18 Mar 2004 19:44
Date: Thu, 18 Mar 2004 19:44
35 lines
2901 bytes
2901 bytes
Gord wrote: > Hi all > > Thanks to Curt I have greatly improved the filtering of Usenet > messages going into my database. > > I'm currently working on yEnc decoding of multi part binaries and have > run into a snag. > > At first I simply wrote the information into a text file and attempted > to decode that. Treating binary information as text doesn't work too > well and I've switched to simply grabbing the bytes as they come in > and doing a binary write out to a single text file. > > Now all the information is correctly in the text file but there appear > to be control characters messing with the formatting. All the > information appears to be tabbed and there are many broken lines. > > Anyone have experience dealing with this? > > Any and all help appreciated. Just so you don't get too frustrated, there appear to be some VERY broken yENC encoders out there, which produce output unlike that in the standard at yenc.org. If you do manage to produce something better than uudeview, please share, as you will have discovered how/why the encoding is so broken. -- bill davidsen (davidsen@darkstar.prodigy.com) SBC/Prodigy Yorktown Heights NY data center Project Leader, USENET news http://newsgroups.news.prodigy.com
Re: yEnc decoding question
Author: Curt Welch
Date: Sat, 20 Mar 2004 06:41
Date: Sat, 20 Mar 2004 06:41
14 lines
1786 bytes
1786 bytes
Gord <gord_muir@nospam_hotmail.com> wrote: > Now i'm playing with WILDMAT command. Can anyone tell me how to match > a fragment? It should be easy but I can't see it yet. > > I want to match 'ogg'. Using *ogg* doesn't work. It should. You must be doing something wrong. :) Any chance you have the pattern and string arguments backwards? -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
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