🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #74653

Re: RFC 3997 support in NNTP server software?

#74653
From: Curt Welch
Date: Sun, 14 Jan 2007 06:03
88 lines
6176 bytes
Grant Robertson <bogus@bogus.invalid> wrote:

> > >Both the servers and readers must transmit data in full 8 bits.
> >
> > No news software can handle opaque binary data, because we depend
> > on an inline end-of-article tag to know where an article stops;
> > to do otherwise would require changing every program (since you'd
> > have to send the length first, and then the article, so the
> > recipient could count to the provided length to know where the
> > article ends).
>
> So that explains why NNTP can't carry binary data directly and
> independently.

Many of the major servers now do support 8 bit binary data in the article
body.  Only the headers, and the requirement that the article end with CR
LF limits the data.  If you build your own network out of servers that
support 8 bit data, and use an article format that deals with the
limitation that the article must end with CR LF, then you can use off the
shelf servers to do pure 8 bit binary.

On the real Usenet, it gets more complex mostly for historic reasons.
Usenet started on Unix machines and the article format was defined in terms
Unix text files which used only the LF as the end of line marker.  And of
course, Usenet was intended for only text articles with the assumption that
systems like UUENCODE would be used if you really just had to send a binary
file in the text article.  The original Usenet transport protocols all
passed articles around in Unix format - they didn't use CR LF end of line
markers.  Not until NNTP was created for transporting Usenet articles over
the few lucky sites to have access to the Internet was the CR LF issue
added.  And it was done only because of the convention to use that format
for text articles on the Internet.

The first NNTP implementations all converted the CR LF wire format to the
LF disk format, and back again.

Over the years, NNTP became the rule instead of the exception for both
transporting and accessing Usenet articles.  But other than the tendency of
Usenet servers to used limited length line buffers, and standard nul
terminated C strings to hold lines, the other hidden complexity to pure
binary was the fact that CR LF got converted to LF and then back to CR LF
on transmitting.  This meant if you sent an article with a lone LF, many
servers would convert it to CR LF along the way.  So you get extra CRs
added to your binary file.  And, once that happened, if the next character
was a dot, then that could get picked up as part of the dot stuffing and
cause more corruption.

Servers as late as Diablo (mid 90's) still stored articles in UNIX style LF
format.  But later NNTP based servers, tend to move away from that and
store articles in NNTP wire format with CR LF (so it didn't have to do
conversions which required article size expansion and contraction).
Highwind's servers I think were 8 bit clean.

A wire-format option was added to Diablo some time back so a Diablo system
configured to use wire format is mostly 8 bit clean.  But I think it might
still allow LF DOT LF to terminate an article which causes corruption.

INN I think uses wire format and I think is 8 bit clean for transport and
reading but articles posted from INN I think might have an issue with line
length.

So in general, A good bit of Usenet is _almost_ able to carry 8 bit binary
in the article body and were were well on the way of motivating Usenet to
convert when yenc was created to move binary transport from the 6 bit
format of uuencode to an effective 7.9 bit (or something like that).  Now
that we have almost pure binary transport implemented on Usenet, there's
almost no motivation to convert to pure 8 bit bodies so it's unlikely to
ever happen at this point.

But, if you can control which servers get used on your private network,
there are some that support 8 bit clean bodies, and ones like Diablo, if
they don't, are so close to doing it (when configured correctly) that you
could make the few changes that are needed yourself or get someone to do it
(if you could afford to pay them).

I don't know what the current status of readers are for dealing with 8 bit.
I would guess most don't.  But if you are going to use some new 8 bit
binary format for transporting files, you are going to have to write a
custom reader anyhow.

The easiest way to do it and be compatible with current clients and
servers, is to just yenc your data - which gives you almost 8 bit
transport. (I didn't see the start of this thread so I don't know what you
are tying to do).

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                                        http://NewsReader.Com/
Technical Details
Message-ID: <20070114010347.161$0M@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.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!198.186.194.247.MISMATCH!news-xxxfer.readnews.com!news-out.readnews.com!postnews3.readnews.com!nr3.newsreader.com.POSTED!not-for-mail
References: <MPG.2010ceba89601f639896da@news.newsguy.com> <eo7446$aqi$1@puck.litech.org> <MPG.2011708e48ee6d6a9896db@news.newsguy.com> <eo92ge$cqm$1@puck.litech.org> <MPG.201230949f9057839896dd@news.newsguy.com>

Show Full Headers
Complete Article Headers
Message-ID: <20070114010347.161$0M@newsreader.com>
Subject: Re: RFC 3997 support in NNTP server software?
Date: Sun, 14 Jan 2007 06:03:40 +0000
From: curt@kcwc.com (Curt Welch)
References: <MPG.2010ceba89601f639896da@news.newsguy.com> <eo7446$aqi$1@puck.litech.org> <MPG.2011708e48ee6d6a9896db@news.newsguy.com> <eo92ge$cqm$1@puck.litech.org> <MPG.201230949f9057839896dd@news.newsguy.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.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!198.186.194.247.MISMATCH!news-xxxfer.readnews.com!news-out.readnews.com!postnews3.readnews.com!nr3.newsreader.com.POSTED!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-NRC-Trace: NewsReader.Com iiEuP1KQVbU.2el/W0Dw=Y=XimtTst6Ylpfw8xjKqYOX=K
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: 88
NNTP-Posting-Host: 696abab4.nr3.newsreader.com
X-Trace: DXC=UmZiNUe`cD1a8jEYgT??96OA8_@f\K_i2aQ6g14UKj>:^>=4g0lDEf2iJ;
 iV2YAoG5@ZPNc1]gjc; a?0hgfYXOa<
X-Complaints-To: abuse@newsreader.com