🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
2 messages
2 total messages Started by Faye Pearson Wed, 06 Nov 2002 15:18
Bytes and Lines values
#61835
Author: Faye Pearson
Date: Wed, 06 Nov 2002 15:18
17 lines
1288 bytes
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?


Faye

-- 
Faye Pearson,
Covert Development
ClaraNET Ltd.       Tel 020 7903 3000
Re: Bytes and Lines values
#61837
Author: 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/
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