🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
14 messages
14 total messages Started by Jason Tue, 26 May 2009 18:17
NNTP Protocol Question
#81100
Author: Jason
Date: Tue, 26 May 2009 18:17
20 lines
1996 bytes
Hi guys,

Little question with regards to the NNTP protocol.

Say I have a posts message ID, and also know that its been cross
posted to three groups a,b and c.

Firstly is that message ID 100% unique among all posts on the server?
Secondly, will all three of those cross-posts share the same message
ID?

And finally to retrieve this cross-posted article, do I (or should I)
have to specify the group before retrieving the article with the GROUP
command?

Currently, I just connect/authenticate and run ARTICLE <id> and it
find it and downloads it without me specifying the group first. Is
this an acceptable approach, or could it introduce problems?

Thanks alot.
Re: NNTP Protocol Question
#81102
Author: Russ Allbery
Date: Tue, 26 May 2009 18:37
39 lines
2308 bytes
Jason <jecheney@gmail.com> writes:

> Little question with regards to the NNTP protocol.
>
> Say I have a posts message ID, and also know that its been cross
> posted to three groups a,b and c.
>
> Firstly is that message ID 100% unique among all posts on the server?

Yes.

> Secondly, will all three of those cross-posts share the same message
> ID?

Yes.

> And finally to retrieve this cross-posted article, do I (or should I)
> have to specify the group before retrieving the article with the GROUP
> command?

No, you can either retrieve the article by number from a group (after
sending a GROUP command) or you can retrieve it by message ID directly
with ARTICLE.

Note that the number of the article within each group will be different.
Article numbers are specific to groups.  But the message ID will always
be the same.

> Currently, I just connect/authenticate and run ARTICLE <id> and it
> find it and downloads it without me specifying the group first. Is
> this an acceptable approach, or could it introduce problems?

That's fine.

-- 
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 Protocol Question
#81101
Author: Xavier Roche
Date: Tue, 26 May 2009 18:43
38 lines
2752 bytes
Jason a écrit :
> Firstly is that message ID 100% unique among all posts on the server?

In theory, yes. (Except if the server was bogus)

RFC 850
"The same message ID may not be reused during the lifetime of any 
article with the  same  message ID.   (It  is recommended that no 
message ID be reused for at least two years.)"

And in many cases, the generated message-id is "permanently" globally 
unique, because built using
- with the site's hostname (FQDN or equivalent) as right part
- a temporaly unique site-specific id (timestamp, random hash, ..) (as 
suggested by RFC 850: "For example,  the  "unique"   part   could   be 
  an   integer representing  a  sequence number for articles submitted 
to the network, or a short string derived from the  date  and time  the 
article was created")

> Secondly, will all three of those cross-posts share the same message
> ID?

Yes. This is the same article presented in multiple groups, actually.

> And finally to retrieve this cross-posted article, do I (or should I)
> have to specify the group before retrieving the article with the GROUP
> command?

RFC 977 is not totally clear, but RFC 3977 is explicit:
    First form (message-id specified)
      220 0|n message-id    Article follows (multi-line)
      430                   No article with that message-id

Hence, the "No newsgroup selected" reply is not possible with the 
ARTICLE <MID> form.

(And AFAIK no server require to be in a group to fetch an article by 
message-id)
Re: NNTP Protocol Question
#81103
Author: Jason
Date: Tue, 26 May 2009 19:07
46 lines
3166 bytes
On 26 May, 19:43, Xavier Roche <xro...@free.fr.NOSPAM.invalid> wrote:
> Jason a écrit :
>
> > Firstly is that message ID 100% unique among all posts on the server?
>
> In theory, yes. (Except if the server was bogus)
>
> RFC 850
> "The same message ID may not be reused during the lifetime of any
> article with the  same  message ID.   (It  is recommended that no
> message ID be reused for at least two years.)"
>
> And in many cases, the generated message-id is "permanently" globally
> unique, because built using
> - with the site's hostname (FQDN or equivalent) as right part
> - a temporaly unique site-specific id (timestamp, random hash, ..) (as
> suggested by RFC 850: "For example,  the  "unique"   part   could   be
>   an   integer representing  a  sequence number for articles submitted
> to the network, or a short string derived from the  date  and time  the
> article was created")
>
> > Secondly, will all three of those cross-posts share the same message
> > ID?
>
> Yes. This is the same article presented in multiple groups, actually.
>
> > And finally to retrieve this cross-posted article, do I (or should I)
> > have to specify the group before retrieving the article with the GROUP
> > command?
>
> RFC 977 is not totally clear, but RFC 3977 is explicit:
>     First form (message-id specified)
>       220 0|n message-id    Article follows (multi-line)
>       430                   No article with that message-id
>
> Hence, the "No newsgroup selected" reply is not possible with the
> ARTICLE <MID> form.
>
> (And AFAIK no server require to be in a group to fetch an article by
> message-id)

Brilliant, thanks very much guys.
Re: NNTP Protocol Question
#81105
Author: D. Stussy
Date: Wed, 27 May 2009 01:33
15 lines
1685 bytes
"Russ Allbery" <rra@stanford.edu> wrote in message
news:87tz37r9rf.fsf@windlord.stanford.edu...
> Jason <jecheney@gmail.com> writes:
> ...
> > Secondly, will all three of those cross-posts share the same message
> > ID?
>
> Yes.

Not only that, it is often stored only once - with cross-links for each
group.  In a traditional newsspool, these may be file system hard links,
all pointing at a single file with the article contents.  That's the
advantage of cross-posting (vs. multi-posting).

Re: NNTP Protocol Question
#81109
Author: Torbjorn Lindgren
Date: Thu, 28 May 2009 18:03
43 lines
2775 bytes
In article <gvhd9o$d6j$1@news.httrack.net>,
Xavier Roche  <xroche@free.fr.NOSPAM.invalid> wrote:
>Jason a écrit :
[...]
>> And finally to retrieve this cross-posted article, do I (or should I)
>> have to specify the group before retrieving the article with the GROUP
>> command?
>
>RFC 977 is not totally clear, but RFC 3977 is explicit:
>    First form (message-id specified)
>      220 0|n message-id    Article follows (multi-line)
>      430                   No article with that message-id
>
>Hence, the "No newsgroup selected" reply is not possible with the 
>ARTICLE <MID> form.
>
>(And AFAIK no server require to be in a group to fetch an article by 
>message-id)

Several of the big commercial "farm" type servers used to require you
to be on the right "shard" (backend server) for retrieval by
message-id to work. They switched "shard" as needed on GROUP commands
so without a GROUP command it would only work if the previous group
happened to also be stored on the same machine.

So the end result is that while it should work it can sometimes cause
problem, though in a sane world I wouldn't expect it to hit something
that only reads text (no reason to split text groups in multiple
shards, it's MINISCULE, and sane implementations would default to the
text shard or even always query it as a fallback).

But as Xavier notes the original RFC was kind of ambigious (in many
places) and 3977 is very new (and not always followed) in the NNTP
arena.

There's good reason why several NNTP binary download programs either
have options to always send GROUP before retrieval by message-id or
will send a GROUP command and the retry if a retrieval by message-id
fails...

I don't know if there are still servers that does this or if they all
now has a unified lookup. I expect that NZB means this behavior caused
more problems so I would at least expect it to be less common.
Re: NNTP Protocol Question
#81110
Author: Julien ÉLIE
Date: Thu, 28 May 2009 18:29
30 lines
2287 bytes
Hi Torbjorn,

> Several of the big commercial "farm" type servers used to require you
> to be on the right "shard" (backend server) for retrieval by
> message-id to work. They switched "shard" as needed on GROUP commands
> so without a GROUP command it would only work if the previous group
> happened to also be stored on the same machine.

Interesting to know!  Thanks.

I then wonder whether draft-ellermann-news-nntp-uri-11 should not deal
with that.

    nntp://news.server.com/news.group/123
    news://news.server.com/test@example.com

are possible.

But *not*

    news://news.server.com/news.group/test@example.com

(which should also handle crossposts in some manner).

-- 
Julien ÉLIE

« La moitié des hommes politiques sont des bons à rien.
  Les autres sont prêts à tout. » (Coluche) 
Re: NNTP Protocol Question
#81127
Author: Curt Welch
Date: Sat, 30 May 2009 05:20
79 lines
5446 bytes
=?Windows-1252?Q?Julien_=C9LIE?= <iulius@nom-de-mon-site.com.invalid>
> wrote: Hi Torbjorn,
>
> > Several of the big commercial "farm" type servers used to require you
> > to be on the right "shard" (backend server) for retrieval by
> > message-id to work. They switched "shard" as needed on GROUP commands
> > so without a GROUP command it would only work if the previous group
> > happened to also be stored on the same machine.
>
> Interesting to know!  Thanks.
>
> I then wonder whether draft-ellermann-news-nntp-uri-11 should not deal
> with that.
>
>     nntp://news.server.com/news.group/123
>     news://news.server.com/test@example.com
>
> are possible.
>
> But *not*
>
>     news://news.server.com/news.group/test@example.com
>
> (which should also handle crossposts in some manner).

I too have heard that some servers required a group command before issuing
a fetch by mid.  Personally, I think we should just declare the server
broken and not allow anyone to use them. :)

I don't actually know which server does that, I've never seen it in action.

All the largest "farm" servers I know about DON'T have that problem.  Most
of the large farm servers don't split up back ends by group, so it's not
even an issue for most of them.  They split it up by message-id so knowing
the message-id you are looking for is all the front end needs to know to
find it.  But even the ones that I know that did split them up by group,
didn't have that problem.  Easynews was one large server farm that did (and
I think still does unless it's been changed recently) split up the back
ends by group, but they were smart enough to solve all these problems and
make look up by message ID work correctly even if you didn't specify the
group first.

I think the server that might have gotten it wrong was surge news from the
dnews guys which was some sort of NNTP proxy switch as I understand it.  I
don't know of anyone major is still using that software.  The one company
well known for using it (newsfeeds/usenet.com/?/?) has switched to a server
that can do lookup by mid correctly without a group (last I checked).

There might well be some NNTP proxy systems that require the group first.
But if they do exist, they should be thrown away and replaced with smarter
software that actually works. :)

Message-Ids are too important to how Usenet works to require that the
client go searching group by group to find it if the client doesn't know
the group.  If some front end proxy doesn't know where it is, and a search
is required, the proxy should do the searching, not the client, because the
proxy at least knows how many back end servers to check.  A client taking
random guesses at groups to try and find it is just stupid.

The whole point of Xref headers is to allow the client to find the groups,
and the article numbers, if all they have is the message-id. If the server
doesn't allow the client to fetch by id without first telling the server
the group, then the server has just failed to support an important features
of Usenet - the ability to find the group when you don't have it. (Diablo
doesn't get that correct, becuase it doesn't typically return a valid Xref
when you fetch by ID, so it's something I've always considered broken about
Diablo).  Diablo however does give you the article, and you can get the
Newsgroup: list from the article, and then go searching each group from the
article to find the article numbers - which sucks, but at least it works
and doesn't require a linear search of every group in the active file.

If I was writing a client, and I found a machine that required the
group first, yes I would modify my client to try selecting the group if it
got an error and the group was not already selected, but I wouldn't like
having to do it. :)

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: NNTP Protocol Question
#81130
Author: Julien ÉLIE
Date: Sat, 30 May 2009 08:37
61 lines
4111 bytes
Hi Curt,

Thanks a lot for your valuable comments!


> All the largest "farm" servers I know about DON'T have that problem.  Most
> of the large farm servers don't split up back ends by group, so it's not
> even an issue for most of them.  They split it up by message-id so knowing
> the message-id you are looking for is all the front end needs to know to
> find it.

When they do that, is it the "hashfeed" system that we have in both Diablo
and (now) INN?  (based upon a MD5 hash of the message-ID)


> There might well be some NNTP proxy systems that require the group first.
> But if they do exist, they should be thrown away and replaced with smarter
> software that actually works. :)

:)


> (Diablo
> doesn't get that correct, becuase it doesn't typically return a valid Xref
> when you fetch by ID, so it's something I've always considered broken about
> Diablo).  Diablo however does give you the article, and you can get the
> Newsgroup: list from the article, and then go searching each group from the
> article to find the article numbers - which sucks, but at least it works
> and doesn't require a linear search of every group in the active file.

Oh, that's bad.  I indeed read in their FAQ:

  6.5. I sometimes see different headers for the same article, how can that be?

    This is normal and has to do with the way diablo gets article from the spool.
    There are two ways to get an article.  You either supply a message-id directly,
    or you supply a groupname and article number.  When you supply an article number
    dreaderd uses the overview database to translate this to a message-id, but
    at the same time remembers other headers from the article that are also
    available in the overview database.  The Path: header is an example of this.
    Dreaderd then fetches the article from the backend spool, and replaces some
    article headers with the versions it knows from overview.  This was done
    because some clients get confused when the last entry in the Path: header
    doesn't match the Xref: hostname.  When you supply a message-id directly
    none of this "munging" is done and you get the article as it appears
    on the spoolserver.


So we get the Xref: header of the server which sent the article to Diablo
when requesting by message-ID.  The same goes for the Path: header!

Hmmm...  It means that Diablo also gets wrong the :bytes metadata they answer
in (X)OVER commands; it would differ between a request by message-ID or article
number!

-- 
Julien ÉLIE

« -- Par Poséidon ! Quel prodige !!!
  -- Par Neptune ! Quel sans-gêne ! » (Astérix) 
Re: NNTP Protocol Question
#81141
Author: Torbjorn Lindgren
Date: Sat, 30 May 2009 17:16
74 lines
4795 bytes
In article <20090530011921.790$hv@newsreader.com>,
Curt Welch <curt@kcwc.com> wrote:
>=?Windows-1252?Q?Julien_=C9LIE?= <iulius@nom-de-mon-site.com.invalid>
>> wrote: Hi Torbjorn,
>> > Several of the big commercial "farm" type servers used to require you
>> > to be on the right "shard" (backend server) for retrieval by
>> > message-id to work. They switched "shard" as needed on GROUP commands
>> > so without a GROUP command it would only work if the previous group
>> > happened to also be stored on the same machine.
[...]
>I too have heard that some servers required a group command before issuing
>a fetch by mid.  Personally, I think we should just declare the server
>broken and not allow anyone to use them. :)
>
>I don't actually know which server does that, I've never seen it in action.

This was many years back but IIRC at least some of the Highwinds
servers used to have this defect, other Highwind servers instead had
problems with retrieval by message-id of "old" articles instead! I
know Highwind's server used to be widely used at that time.

As I was told the Highwind software had a setting for message-id cache
size where the default value was wildly insufficient for real usage. A
competent admin would set it properly but that was by no means a given
(also, databases tends to be slower and/or require more IO the more
data you have in them).

It's possible that the two issues were really one, IE that if the
cache size wasn't set correctly articles outside the cache was only
available via message-id retrieval with the correct group command.
That would arguably make it a server admin configuration error and
then it might have only affected some servers.

Perhaps if someone has access to modern copy of Highwind's suite of
software they might be able to tell us how they handle this now.


>All the largest "farm" servers I know about DON'T have that problem.  Most
>of the large farm servers don't split up back ends by group, so it's not
>even an issue for most of them.  They split it up by message-id so knowing
>the message-id you are looking for is all the front end needs to know to
>find it.  But even the ones that I know that did split them up by group,
>didn't have that problem.  Easynews was one large server farm that did (and
>I think still does unless it's been changed recently) split up the back
>ends by group, but they were smart enough to solve all these problems and
>make look up by message ID work correctly even if you didn't specify the
>group first.

Like I said it was many years ago, I wouldn't be the least surprised
if all of them are fixed. The fact that you don't know of any now
certainly suggests this.

Some sources say EasyNews uses Highwinds which would match the group
based splitting they at least used to do (and I would expect EN to get
the cache size correct, as opposed to say the early days with UNS, no
idea if they've shaped up since). 

[...]
>If I was writing a client, and I found a machine that required the
>group first, yes I would modify my client to try selecting the group if it
>got an error and the group was not already selected, but I wouldn't like
>having to do it. :)

I know that various forms of server problems hit Newsbin Pro when they
switched to retrieval by message-id (IIRC v4 used article numbers, v5
uses message ids) and I'm fairly certain this was one of them, I'm
sure that it used to have an option for it. It's not there any longer
so it's been either automatic or removed.

Looking at the command stream I can see that it uses message-ids
without group commands but it's possible that it would use them for
the retries if it got errors. Only the author would know unless you
found a "bad" server to run it against or ran a proxy which modified
commands on the fly to trigger this :-)
Re: NNTP Protocol Question
#81163
Author: Curt Welch
Date: Sun, 31 May 2009 20:00
112 lines
7355 bytes
Torbjorn Lindgren <tl@none.invalid> wrote:
> In article <20090530011921.790$hv@newsreader.com>,
> Curt Welch <curt@kcwc.com> wrote:
> >=?Windows-1252?Q?Julien_=C9LIE?= <iulius@nom-de-mon-site.com.invalid>
> >> wrote: Hi Torbjorn,
> >> > Several of the big commercial "farm" type servers used to require
> >> > you to be on the right "shard" (backend server) for retrieval by
> >> > message-id to work. They switched "shard" as needed on GROUP
> >> > commands so without a GROUP command it would only work if the
> >> > previous group happened to also be stored on the same machine.
> [...]
> >I too have heard that some servers required a group command before
> >issuing a fetch by mid.  Personally, I think we should just declare the
> >server broken and not allow anyone to use them. :)
> >
> >I don't actually know which server does that, I've never seen it in
> >action.
>
> This was many years back but IIRC at least some of the Highwinds
> servers used to have this defect, other Highwind servers instead had
> problems with retrieval by message-id of "old" articles instead! I
> know Highwind's server used to be widely used at that time.

That could be. The original highwinds software didn't support server farms
at all.  They were designed to run on a single large machine.  But then
highwinds added some sort of support for server farms but I was not aware
of anyone that ever used that.  I myself never ran higwinds so I don't know
that much about it.  I did try to run there FreeBSD version for a while but
it never worked so I gave up.  Highwinds needed good thread support to work
correctly and FreeBSD didn't have good thread support.

> As I was told the Highwind software had a setting for message-id cache
> size where the default value was wildly insufficient for real usage. A
> competent admin would set it properly but that was by no means a given
> (also, databases tends to be slower and/or require more IO the more
> data you have in them).
>
> It's possible that the two issues were really one, IE that if the
> cache size wasn't set correctly articles outside the cache was only
> available via message-id retrieval with the correct group command.
> That would arguably make it a server admin configuration error and
> then it might have only affected some servers.

That might be true.

> Perhaps if someone has access to modern copy of Highwind's suite of
> software they might be able to tell us how they handle this now.

It's changed a lot over the years and I don't know what shape it's in. I
think the current higwinds company actually threw out the highwinds code
and switched to Diablo recently. :)

> >All the largest "farm" servers I know about DON'T have that problem.
> >Most of the large farm servers don't split up back ends by group, so
> >it's not even an issue for most of them.  They split it up by message-id
> >so knowing the message-id you are looking for is all the front end needs
> >to know to find it.  But even the ones that I know that did split them
> >up by group, didn't have that problem.  Easynews was one large server
> >farm that did (and I think still does unless it's been changed recently)
> >split up the back ends by group, but they were smart enough to solve all
> >these problems and make look up by message ID work correctly even if you
> >didn't specify the group first.
>
> Like I said it was many years ago, I wouldn't be the least surprised
> if all of them are fixed. The fact that you don't know of any now
> certainly suggests this.
>
> Some sources say EasyNews uses Highwinds which would match the group
> based splitting they at least used to do (and I would expect EN to get
> the cache size correct, as opposed to say the early days with UNS, no
> idea if they've shaped up since).

Yes, my understanding is that EasyNews was (and maybe still is) using
Highwinds.

But when Usenet got too large to run it on a single larger server, my
understanding is that they solved the problem by witting their own
front-end NNTP switch software. So the users connected to their smart front
end boxes, and they used normal Highwinds servers as the backend, and
simply limited which groups were on which back end server to spread the
load across multiple groups.

The difference however is that their custom front end switch was very well
written and didn't require you do things like do a group command first. It
correctly fetched articles by Message-ID and I think always returned valid
X-Ref headers (not an easy feat since articles cross posted to groups on
different servers got assigned article numbers on different servers).

> [...]
> >If I was writing a client, and I found a machine that required the
> >group first, yes I would modify my client to try selecting the group if
> >it got an error and the group was not already selected, but I wouldn't
> >like having to do it. :)
>
> I know that various forms of server problems hit Newsbin Pro when they
> switched to retrieval by message-id (IIRC v4 used article numbers, v5
> uses message ids) and I'm fairly certain this was one of them, I'm
> sure that it used to have an option for it. It's not there any longer
> so it's been either automatic or removed.
>
> Looking at the command stream I can see that it uses message-ids
> without group commands but it's possible that it would use them for
> the retries if it got errors. Only the author would know unless you
> found a "bad" server to run it against or ran a proxy which modified
> commands on the fly to trigger this :-)

Yeah, there's probably some servers somewhere still needing a group
command first.  I just don't know where it is.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: NNTP Protocol Question
#81164
Author: Curt Welch
Date: Sun, 31 May 2009 20:15
89 lines
5922 bytes
=?Windows-1252?Q?Julien_=C9LIE?= <iulius@nom-de-mon-site.com.invalid>
> wrote: Hi Curt,
>
> Thanks a lot for your valuable comments!
>
> > All the largest "farm" servers I know about DON'T have that problem.
> > Most of the large farm servers don't split up back ends by group, so
> > it's not even an issue for most of them.  They split it up by
> > message-id so knowing the message-id you are looking for is all the
> > front end needs to know to find it.
>
> When they do that, is it the "hashfeed" system that we have in both
> Diablo and (now) INN?  (based upon a MD5 hash of the message-ID)

Yes, or some variation of the same idea.

> > There might well be some NNTP proxy systems that require the group
> > first. But if they do exist, they should be thrown away and replaced
> > with smarter software that actually works. :)
>
> :)
>
> > (Diablo
> > doesn't get that correct, becuase it doesn't typically return a valid
> > Xref when you fetch by ID, so it's something I've always considered
> > broken about Diablo).  Diablo however does give you the article, and
> > you can get the Newsgroup: list from the article, and then go searching
> >   each group from the
> > article to find the article numbers - which sucks, but at least it
> > works and doesn't require a linear search of every group in the active
> > file.
>
> Oh, that's bad.  I indeed read in their FAQ:
>
>   6.5. I sometimes see different headers for the same article, how can
>   that be?
>
>     This is normal and has to do with the way diablo gets article from
>     the spool. There are two ways to get an article.  You either supply a
>     message-id directly, or you supply a groupname and article number.
>     When you supply an article number dreaderd uses the overview database
>     to translate this to a message-id, but at the same time remembers
>     other headers from the article that are also available in the
>     overview database.  The Path: header is an example of this. Dreaderd
>     then fetches the article from the backend spool, and replaces some
>     article headers with the versions it knows from overview.  This was
>     done because some clients get confused when the last entry in the
>     Path: header doesn't match the Xref: hostname.  When you supply a
>     message-id directly none of this "munging" is done and you get the
>     article as it appears on the spoolserver.
>
> So we get the Xref: header of the server which sent the article to Diablo
> when requesting by message-ID.  The same goes for the Path: header!

Well, it might be smart enough to strip that out for you.  I think it does
but I'm not sure.  Maybe it's the dreaderd front end that does the
stripping out when fetched by message-id?

Path headers I think might get modified as well by dreaderd when it fetches
by message-id.

Maybe the newer versions of dreaderd do more than that FAQ says?

> Hmmm...  It means that Diablo also gets wrong the :bytes metadata they
> answer in (X)OVER commands; it would differ between a request by
> message-ID or article number!

Yeah, but that's historically typical.  You can't trust the size number to
be accurate.  Maybe the new OVER command fixed that, I'm not sure.  There
was never a clear definition of what size you were supposed to return for
xover.  There was the raw wire size of the article that includes the CR LF
and the extra stuffed dots, there's the size without the dot stuffing, but
still using CR LF for line ends. Then there's the size of the article if it
has been stored on a unix system where the CR LF was converted to just LF.
And for the raw formats, it was never clear if the trailing DOT CR LF
should be counted as part of the size or not.

Then there are the problems caused by path and xref and other header
modifications that often caused the reported size in xover not to match the
true size when it was finally downloaded simply becuase some headers would
get changed after the point where the article size was calculated.

Because of all these issues, you can't really trust the size to be
accurate. It should be seen only as a close approximation (unless this has
been cleaned up in the new RFC with the OVER command).

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Re: NNTP Protocol Question
#81169
Author: Julien ÉLIE
Date: Sun, 31 May 2009 21:17
61 lines
4072 bytes
Hi Curt,

> Yeah, but that's historically typical.  You can't trust the size number to
> be accurate.  Maybe the new OVER command fixed that, I'm not sure.  There
> was never a clear definition of what size you were supposed to return for
> xover.  There was the raw wire size of the article that includes the CR LF
> and the extra stuffed dots, there's the size without the dot stuffing, but
> still using CR LF for line ends. Then there's the size of the article if it
> has been stored on a unix system where the CR LF was converted to just LF.
> And for the raw formats, it was never clear if the trailing DOT CR LF
> should be counted as part of the size or not.
>
> Because of all these issues, you can't really trust the size to be
> accurate. It should be seen only as a close approximation (unless this has
> been cleaned up in the new RFC with the OVER command).


Yes, OVER is properly defined.  A compliant news server should follow
what the SHOULD describes.  (And the note on the accuracy of what
existing implementations return corresponds to your explanations.)


8.1.1.  The :bytes Metadata Item

   The :bytes metadata item for an article is a decimal integer.  It
   SHOULD equal the number of octets in the entire article: headers,
   body, and separating empty line (counting a CRLF pair as two octets,
   and excluding both the "." CRLF terminating the response and any "."
   added for "dot-stuffing" purposes).

   Note to client implementers: some existing servers return a value
   different from that above.  The commonest reasons for this are as
   follows:

   o  Counting a CRLF pair as one octet.

   o  Including the "." character used for dot-stuffing in the number.

   o  Including the terminating "." CRLF in the number.

   o  Using one copy of an article for counting the octets but then
      returning another one that differs in some (permitted) manner.

   Implementations should be prepared for such variation and MUST NOT
   rely on the value being accurate.


8.1.2.  The :lines Metadata Item

   The :lines metadata item for an article is a decimal integer.  It
   MUST equal the number of lines in the article body (excluding the
   empty line separating headers and body).  Equivalently, it is two
   less than the number of CRLF pairs that the BODY command would return
   for that article (the extra two are those following the response code
   and the termination octet).

-- 
Julien ÉLIE

« Ad iura renunciata, non datur regressus. » 
Re: NNTP Protocol Question
#81175
Author: Curt Welch
Date: Mon, 01 Jun 2009 04:19
61 lines
4520 bytes
=?Windows-1252?Q?Julien_=C9LIE?= <iulius@nom-de-mon-site.com.invalid>
> wrote: Hi Curt,
>
> > Yeah, but that's historically typical.  You can't trust the size number
> > to be accurate.  Maybe the new OVER command fixed that, I'm not sure.
> > There was never a clear definition of what size you were supposed to
> > return for xover.  There was the raw wire size of the article that
> > includes the CR LF and the extra stuffed dots, there's the size without
> > the dot stuffing, but still using CR LF for line ends. Then there's the
> > size of the article if it has been stored on a unix system where the CR
> > LF was converted to just LF. And for the raw formats, it was never
> > clear if the trailing DOT CR LF should be counted as part of the size
> > or not.
> >
> > Because of all these issues, you can't really trust the size to be
> > accurate. It should be seen only as a close approximation (unless this
> > has been cleaned up in the new RFC with the OVER command).
>
> Yes, OVER is properly defined.  A compliant news server should follow
> what the SHOULD describes.  (And the note on the accuracy of what
> existing implementations return corresponds to your explanations.)
>
> 8.1.1.  The :bytes Metadata Item
>
>    The :bytes metadata item for an article is a decimal integer.  It
>    SHOULD equal the number of octets in the entire article: headers,
>    body, and separating empty line (counting a CRLF pair as two octets,
>    and excluding both the "." CRLF terminating the response and any "."
>    added for "dot-stuffing" purposes).
>
>    Note to client implementers: some existing servers return a value
>    different from that above.  The commonest reasons for this are as
>    follows:
>
>    o  Counting a CRLF pair as one octet.
>
>    o  Including the "." character used for dot-stuffing in the number.
>
>    o  Including the terminating "." CRLF in the number.
>
>    o  Using one copy of an article for counting the octets but then
>       returning another one that differs in some (permitted) manner.
>
>    Implementations should be prepared for such variation and MUST NOT
>    rely on the value being accurate.
>
> 8.1.2.  The :lines Metadata Item
>
>    The :lines metadata item for an article is a decimal integer.  It
>    MUST equal the number of lines in the article body (excluding the
>    empty line separating headers and body).  Equivalently, it is two
>    less than the number of CRLF pairs that the BODY command would return
>    for that article (the extra two are those following the response code
>    and the termination octet).

Yes, good to see they did finally formalize what it _should_ be returning.
That at least gets us headed in a the right direction!

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        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