Thread View: news.software.nntp
10 messages
10 total messages
Started by Ikke
Mon, 01 Jan 2007 19:57
How to find all the parts of a multipart message?
Author: Ikke
Date: Mon, 01 Jan 2007 19:57
Date: Mon, 01 Jan 2007 19:57
14 lines
1509 bytes
1509 bytes
Hi everybody, I'd like to start writing my own NNTP client in a few days, so I've had a quick look at the basic NNTP RFC stuff to get to know the protocol. Easy enough so far, yet something still puzzles me: multipart messages. For instance, someone posts a message existing of 4 parts - how do I know those parts belong together? Surely there must be an easy way to identify related messages through the information in the headers? Thanks in advance, Ikke
Re: How to find all the parts of a multipart message?
Author: Morten Guldager
Date: Mon, 01 Jan 2007 20:13
Date: Mon, 01 Jan 2007 20:13
34 lines
2295 bytes
2295 bytes
2007-01-01 Ikke wrote > > I'd like to start writing my own NNTP client in a few days, so I've had a > quick look at the basic NNTP RFC stuff to get to know the protocol. > > Easy enough so far, Sure. NNTP is so sweet and simple! Just remember to handle lines starting with a . propperly... It's an easy one to forget, but you will then end up with corrupt files. > yet something still puzzles me: multipart messages. > > For instance, someone posts a message existing of 4 parts - how do I know > those parts belong together? Surely there must be an easy way to identify > related messages through the information in the headers? Hmm, don't think so. Usually you look at the subject line. Problem is that there is no standard way for encoding information in the subject. (not that I know at least) I think you are going to impelment a bunch of regexp's, and be prepared to add more as new mass posting software arrives at the sceene. Maybe you want to split the task in two, a xover-reader which updates a local database with the xover info you found, and a article fetcher which either can read articles ind the database, og just go on from a NZB file. Which platform and language are you using? /Morten %-)
Re: How to find all the parts of a multipart message?
Author: Russ Allbery
Date: Mon, 01 Jan 2007 20:19
Date: Mon, 01 Jan 2007 20:19
14 lines
1677 bytes
1677 bytes
Ikke <ikke@hier.be> writes:
> For instance, someone posts a message existing of 4 parts - how do I know
> those parts belong together? Surely there must be an easy way to identify
> related messages through the information in the headers?
Unfortunately, there isn't. There's no standard for it at all. News
readers do this purely through heuristics.
--
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: How to find all the parts of a multipart message?
Author: Ikke
Date: Mon, 01 Jan 2007 20:50
Date: Mon, 01 Jan 2007 20:50
20 lines
1897 bytes
1897 bytes
Russ Allbery <rra@stanford.edu> wrote in news:87y7omfqk1.fsf@windlord.stanford.edu: > Ikke <ikke@hier.be> writes: > >> For instance, someone posts a message existing of 4 parts - how do I >> know those parts belong together? Surely there must be an easy way to >> identify related messages through the information in the headers? > > Unfortunately, there isn't. There's no standard for it at all. News > readers do this purely through heuristics. Thank you for your reply, even though I was hoping for another answer :) Do you perhaps know of some code snippets which clarify this? Thanks, Ikke
Re: How to find all the parts of a multipart message?
Author: Morten Guldager
Date: Mon, 01 Jan 2007 20:50
Date: Mon, 01 Jan 2007 20:50
36 lines
2392 bytes
2392 bytes
2nd attempt to post, seems SLRN or my ISP failed... 2007-01-01 Ikke wrote > > I'd like to start writing my own NNTP client in a few days, so I've had a > quick look at the basic NNTP RFC stuff to get to know the protocol. > > Easy enough so far, Sure. NNTP is so sweet and simple! Just remember to handle lines starting with a . propperly... It's an easy one to forget, but you will then end up with corrupt files. > yet something still puzzles me: multipart messages. > > For instance, someone posts a message existing of 4 parts - how do I know > those parts belong together? Surely there must be an easy way to identify > related messages through the information in the headers? Hmm, don't think so. Usually you look at the subject line. Problem is that there is no standard way for encoding information in the subject. (not that I know at least) I think you are going to impelment a bunch of regexp's, and be prepared to add more as new mass posting software arrives at the sceene. Maybe you want to split the task in two, a xover-reader which updates a local database with the xover info you found, and a article fetcher which either can read articles ind the database, og just go on from a NZB file. Which platform and language are you using? /Morten %-)
Re: How to find all the parts of a multipart message?
Author: Bill Cole
Date: Tue, 02 Jan 2007 05:04
Date: Tue, 02 Jan 2007 05:04
62 lines
3935 bytes
3935 bytes
In article <Xns98ABD53F32078ikkehierbe@195.130.132.70>, Ikke <ikke@hier.be> wrote: > Hi everybody, > > I'd like to start writing my own NNTP client in a few days, so I've had a > quick look at the basic NNTP RFC stuff to get to know the protocol. What a truly sad statement. The last thing the world needs is yet another news client written by someone who is just learning NNTP and thinks that knowledge of the real world of news can be gleaned from RFC's. Please, try helping out with one of the open source news clients that already has most of the work done instead of writing yet another innovative combination of the same sorts of brokenness seen in news clients for the past 2 decades. > Easy enough so far, yet something still puzzles me: multipart messages. > > For instance, someone posts a message existing of 4 parts - how do I know > those parts belong together? You can't, at least not all of the time. If the poster is using yEnc, you can probably figure out how to arrange the parts if they are present. If the poster used any other encoding, you are left guessing and playing the percentages. A lot of clients do a reasonably good job (maybe even 90%) by heuristically parsing Subject headers, but posters will do things you do not expect. For example, I have seen posters using both "part of file" and "file of series" numbering in the Subject line like this: Subject: Hot kitty porn: Cats in Death Valley (1/4) (1/4) Subject: Hot kitty porn: Cats in Death Valley (3/4) (1/4) Subject: Hot kitty porn: Cats in Death Valley (1/4) (2/4) Subject: Hot kitty porn: Cats in Death Valley (4/4) (1/4) Subject: Hot kitty porn: Cats in Death Valley (2/4) (1/4) Subject: Hot kitty porn: Cats in Death Valley (2/4) (2/4) Subject: Hot kitty porn: Cats in Death Valley (3/4) (2/4) Subject: Hot kitty porn: Cats in Death Valley (2/4) (3/4) Given all 16 pieces, a client has a 50/50 shot at guessing the right way to order the posts. There are other tricks one could use to disambiguate that sort of case, but that's what you have to do: use multiple tricks. Look at Subject, Date, and he sizes reported in XOVER. Expect to get 90% or so right. > Surely there must be an easy way to identify > related messages through the information in the headers? No matter how many times people say there must surely be such a thing, there is not. News was not created for file transfer and is really not a good medium for it technically. News is designed as a discussion medium. File transport is an afterthought that has never been formally standardized and has been resisted by many sites. There is even something of an adversarial relationship between binaries users and some news admins, which is historically part of why multipart binaries exist. -- Now where did I hide that website...
Re: How to find all the parts of a multipart message?
Author: Morten Guldager
Date: Tue, 02 Jan 2007 07:09
Date: Tue, 02 Jan 2007 07:09
39 lines
2456 bytes
2456 bytes
2007-01-02 Bill Cole wrote > In article <Xns98ABD53F32078ikkehierbe@195.130.132.70>, > Ikke <ikke@hier.be> wrote: > >> Hi everybody, >> >> I'd like to start writing my own NNTP client in a few days, so I've had a >> quick look at the basic NNTP RFC stuff to get to know the protocol. > > What a truly sad statement. Well, not in my opinion. > The last thing the world needs is yet another news client written by > someone who is just learning NNTP and thinks that knowledge of the real > world of news can be gleaned from RFC's. Ofcourse it can not, but its a good starting point. We have seen way too mush software on the net where the author apperently did not read the relevant RFC's before starting out. > Please, try helping out with one of the open source news clients that > already has most of the work done instead of writing yet another > innovative combination of the same sorts of brokenness seen in news > clients for the past 2 decades. Helping an existing project can be far more complicated than working on your own. - making a fair and logical split through the project - communication in the team. - making and living by the rules. - understanding others code When you have done several "on your own" projects you are ready for a team project. -- /Morten %-)
Re: How to find all the parts of a multipart message?
Author: Ikke
Date: Tue, 02 Jan 2007 15:08
Date: Tue, 02 Jan 2007 15:08
26 lines
1933 bytes
1933 bytes
Bill Cole <bill@scconsult.com> wrote in news:bill-DAE11D.00044602012007@toaster.scconsult.com: > In article <Xns98ABD53F32078ikkehierbe@195.130.132.70>, > Ikke <ikke@hier.be> wrote: > >> Hi everybody, >> >> I'd like to start writing my own NNTP client in a few days, so I've >> had a quick look at the basic NNTP RFC stuff to get to know the >> protocol. > > What a truly sad statement. > > The last thing the world needs is yet another news client written by > someone who is just learning NNTP and thinks that knowledge of the > real world of news can be gleaned from RFC's. <snip> What "the world" needs is none of my business - I've had a look at a LOT of NNTP clients, and none of them do what I need them to do. So therefor I am left with the only option, which is to roll my own. Thanks for the rest of your info. Ikke
Re: How to find all the parts of a multipart message?
Author: Ralph Fox
Date: Sat, 06 Jan 2007 21:06
Date: Sat, 06 Jan 2007 21:06
42 lines
3390 bytes
3390 bytes
On Tue, 02 Jan 2007 00:04:46 -0500, in message <bill-DAE11D.00044602012007@toaster.scconsult.com>, Bill Cole wrote: > In article <Xns98ABD53F32078ikkehierbe@195.130.132.70>, > Ikke <ikke@hier.be> wrote: > > > For instance, someone posts a message existing of 4 parts - how do I know > > those parts belong together? > > You can't, at least not all of the time. If the poster is using yEnc, > you can probably figure out how to arrange the parts if they are > present. If the poster used any other encoding, you are left guessing > and playing the percentages. For MIME multipart/partial, you only need the "Content-Type" headers to reliably figure out how to arrange the parts. If you are lucky, you can retrieve the "Content-Type" header with XHDR. For yEnc to give an advantage with the "Cats in Death Valley" example below, you need to download the body first. > A lot of clients do a reasonably good job > (maybe even 90%) by heuristically parsing Subject headers, but posters > will do things you do not expect. For example, I have seen posters using > both "part of file" and "file of series" numbering in the Subject line > like this: > > Subject: Hot kitty porn: Cats in Death Valley (1/4) (1/4) > Subject: Hot kitty porn: Cats in Death Valley (3/4) (1/4) > Subject: Hot kitty porn: Cats in Death Valley (1/4) (2/4) > Subject: Hot kitty porn: Cats in Death Valley (4/4) (1/4) > Subject: Hot kitty porn: Cats in Death Valley (2/4) (1/4) > Subject: Hot kitty porn: Cats in Death Valley (2/4) (2/4) > Subject: Hot kitty porn: Cats in Death Valley (3/4) (2/4) > Subject: Hot kitty porn: Cats in Death Valley (2/4) (3/4) > > Given all 16 pieces, a client has a 50/50 shot at guessing the right way > to order the posts.
Re: How to find all the parts of a multipart message?
Author: Bill Cole
Date: Sun, 07 Jan 2007 00:44
Date: Sun, 07 Jan 2007 00:44
67 lines
4222 bytes
4222 bytes
In article <h130q25vlu805dbl9pkdi8g3hvf5n77rhn@4ax.com>, Ralph Fox <-@-.invalid> wrote: > On Tue, 02 Jan 2007 00:04:46 -0500, in message > <bill-DAE11D.00044602012007@toaster.scconsult.com>, > Bill Cole wrote: > > > In article <Xns98ABD53F32078ikkehierbe@195.130.132.70>, > > Ikke <ikke@hier.be> wrote: > > > > > For instance, someone posts a message existing of 4 parts - how do I know > > > those parts belong together? > > > > You can't, at least not all of the time. If the poster is using yEnc, > > you can probably figure out how to arrange the parts if they are > > present. If the poster used any other encoding, you are left guessing > > and playing the percentages. > > > For MIME multipart/partial, you only need the "Content-Type" > headers to reliably figure out how to arrange the parts. If you > are lucky, you can retrieve the "Content-Type" header with XHDR. That is part of what I mean about guessing and playing percentages. Many sites do not provide any headers not in the overview via XHDR. Some provide non-overview headers if a message happens to be in the cache of the specific reader server you are asking. The result is that with an "XHDR Content-Type $RANGE" you might get some of the headers you ask for, but a reader cannot know for sure whether the articles not showing a Content-Type from XHDR have an interesting one or not. (and no, I'm not kidding. The SBC/Prodigy news farm behaves this way.) > For yEnc to give an advantage with the "Cats in Death Valley" > example below, you need to download the body first. The yEnc draft provides a clear, flexible, and almost deterministically parsable standard for Subject lines that is "strongly recommended" which in non-pathological cases (i.e. without " or 'yEnc' in either Comment part) would disambiguate a conforming Subject. My example does not follow the yEnc convention. Neither do many idiots who post in yEnc, so I suppose I should have specified 'rigorously compliant yEnc' instead of just 'yEnc' as being a format one can figure out easily from a header that should be in every overview. > > > A lot of clients do a reasonably good job > > (maybe even 90%) by heuristically parsing Subject headers, but posters > > will do things you do not expect. For example, I have seen posters using > > both "part of file" and "file of series" numbering in the Subject line > > like this: > > > > Subject: Hot kitty porn: Cats in Death Valley (1/4) (1/4) > > Subject: Hot kitty porn: Cats in Death Valley (3/4) (1/4) > > Subject: Hot kitty porn: Cats in Death Valley (1/4) (2/4) > > Subject: Hot kitty porn: Cats in Death Valley (4/4) (1/4) > > Subject: Hot kitty porn: Cats in Death Valley (2/4) (1/4) > > Subject: Hot kitty porn: Cats in Death Valley (2/4) (2/4) > > Subject: Hot kitty porn: Cats in Death Valley (3/4) (2/4) > > Subject: Hot kitty porn: Cats in Death Valley (2/4) (3/4) > > > > Given all 16 pieces, a client has a 50/50 shot at guessing the right way > > to order the posts. -- Now where did I hide that website...
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