🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #61837

Re: Bytes and Lines values

#61837
From: Curt Welch
Date: Wed, 06 Nov 2002 15:58
41 lines
3248 bytes
Faye Pearson <faye@clara.net> wrote:
> I know they're not supposed to be relied upon but I'd like to
> make sure I'm doing this the same way as other software.
>
> I'm creating xover output and in XOVER, they seem to be the bytes
> in the entire article (header and body) including the CRLF.CRLF and
> the lines in the body excluding the line with the .
>
> Is this correct/ok/bad?

For lines, make sure you are not counting the blank line which comes
between the header and the body, and like you said, the line with the dot
does not count. But on NNTP, the concept of a "line" is not well defined.
I think you should define a line as only ending with a CR LF pair, but some
systems will define it as ending with LF.  So if you have an article with
some lone LFs in it, how many lines does it have?  It's undefined.  But
those are not all that common and are considered either bogus articles or
binary articles so for those who cares what the Lines: value says anyway.

For bytes, there is no standard other than the basic concept of "the entire
article".  Back when articles were stored as files, it was simply the size
of the file.  But on a Unix system, the file was stored as a Unix text file
so lines ended with a single LF instead of CR LF.  They did not of course
include the line with the dot on it, so that was not counted.  But on
wire-format servers which store the articles with CR LF at the end of each
line and dot-escaped, the bytes will normally just tell you how many bytes
are in the entire article as it is stored on that server, so it can be a
very different number than what you would see for the same article stored
as a Unix text file.

Technically, I think you should not include the .CRLF part of the CRLF.CRLF
because it's not part of the article, but no one is going to notice or care
either way.  I don't know what various servers are doing today with that.
Which brand server did you test and conclude it included the .CRLF?  I
don't even know if my own server counts the .CRLF or not, but I suspect it
doesn't.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Technical Details
Message-ID: <20021106105815.703$Mo@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.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!feed1.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
References: <slrnasiclj.aqi.faye@dude.noc.clara.net>

Show Full Headers
Complete Article Headers
Message-ID: <20021106105815.703$Mo@newsreader.com>
Subject: Re: Bytes and Lines values
Date: Wed, 06 Nov 2002 15:58:15 +0000
From: curt@kcwc.com (Curt Welch)
References: <slrnasiclj.aqi.faye@dude.noc.clara.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!feed1.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com /4Zen.=XEJZYwh6uKLr263M0,nsq5gpuEzfw8_8hTkkeXj
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: 40