🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #68097

Re: Byte count in the overview

#68097
From: Curt Welch
Date: Thu, 12 Feb 2004 01:42
101 lines
5977 bytes
"Clive D.W. Feather" <clive@davros.org> wrote:
> I'm looking for input, particularly from client authors, about a detail
> in the new NNTP specification.
>
> The OVER command returns a number of fields for each relevant article.
> The 7th field is the byte count, called Bytes: in LIST OVERVIEW.FMT
> (though our draft renames it to :bytes for good reasons).
>
> The question I have is: what do client authors use this value for, and
> how important is it that it is accurate?

Mostly of course, it's just as a display field in the header list.  But I
believe some clients have used it and the lines fields together to make an
intelligent guess about things such as the size of the attached binary.
Using both Lines and Bytes, you can make a good guess at whether the
article contains uuencoded data or yenc data and then estimate the size of
the data.

It's not important that it be accurate, just "close" for this type of use.

Articles lists can be sorted by artricle size in many newsreaders as well.

> At present, we say that the value SHOULD be the number of octets in the
> article, both header and body, with in particular:
> * each CRLF counts as 2 octets;
> * the count ends with the last CRLF of the article, and excludes the
>    "." CRLF that terminates the response to an ARTICLE or BODY command;
> * similarly, the dot stuffed at the start of a line beginning with a dot
>    in such a response is also not counted (that is, the two dots count as
>    1 octet between them).
>
> We are aware that some servers return a different count. There are three
> common variations:
> * some store the article in a format (e.g. Unix text file) where CRLF is
>    a single octet, and simply return the file size;
> * some store the article in "wire format", including stuffed dots and
>    the final "." CRLF, and again simply return the file size;
> * some - cluster systems - have multiple copies of an article available
>    which differ in a permitted manner, and use the size for one in the
>    overview but return a different copy to ARTICLE and BODY.

My server (and I suspect others as well), will sometimes (depending on the
configuration) modify the header on the fly after reading it from the spool
but before sending it to the user. It can do things like change the Path
and the host name in the Xref: header on the fly.  Because of this, the
header size may be different than the header as it is stored in the spool,
and be different from front-end server to front-end server.  My xover code
makes no attempt to adjust for these minor differences so that's another
source of error between the size of the article as delivered to the client
and the number in the xover data.

> So how much does this matter to clients?  If a client is using the count
> just to drive a killfile, then this level of variation is unimportant.
> But is this the only such use?

Articles are also filtered by size (maybe you think of "filtered" and
"killfile" as the same concept?).

> If the count is used to allocate a
> buffer,

Any newsreader which does that will crash and burn.  I would not make any
attempt to support or encourage that idea.

> it is important that it not be too small [*]. If it is used to
> control streaming (for example, to determine the earliest point at which
> the terminating dot of an ARTICLE command could happen)

Once again, any program written like that deserves to crash and burn.

> then it is
> important that it not be too large [*]. But are these uses too esoteric
> for real clients?

I think so.

I haven't read the wording in the current draft, but I think you are
heading in the correct dirrection when you say the server SHOULD calculate
it according to a well defined standard (the way you outline above is
fine), but that the client should never require it to be accurate to
function correctly.  It should always be considered an "information only"
field for use by the user and not important protocol data.  That is, a
server which returns a value of 0, or a value of 2000 for every article
should not stop the client from functioning.  At worse, it should make
features like sorting by size or filtering by size unusable for that
server.

> This is where we'd like input.
>
> [*] Of course, it is sufficient that a client can derive "not too small"
> or "not too big" values. For example, we could say that the value of
> Bytes: MUST NOT differ from the true value by more than 99 octets plus
> the value of Lines:, or by not more than 5%. If so, the "not too small"
> value would be Bytes:+Lines:+99, or Bytes:*1.05.

Far too complex in my mind.  Last I saw the draft, it was already getting
overly complex because of too much attention to details like this.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Technical Details
Message-ID: <20040211204221.870$UR@newsreader.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.20140818.mbox.gz!intern1.nntp.aus1.giganews.com!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!feed5.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
References: <LfY1uy098PKAFwah@romana.davros.org>

Show Full Headers
Complete Article Headers
Message-ID: <20040211204221.870$UR@newsreader.com>
Subject: Re: Byte count in the overview
Date: Thu, 12 Feb 2004 01:42:21 +0000
From: curt@kcwc.com (Curt Welch)
References: <LfY1uy098PKAFwah@romana.davros.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!intern1.nntp.aus1.giganews.com!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!feed5.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com BHCApy8zeUDTZqZo6mRlXH-kbF.fzCl10MgWYgD.TXCPbNsRsl
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,
 ?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 101