🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #30147

Re: REPOST: Re: Content-Transfer-Encoding: binary

#30147
From: Clayton O'Neill
Date: Wed, 29 Jul 1998 00:00
82 lines
5070 bytes
On 29 Jul 1998 06:11:41 GMT, Curt Welch <curt@kcwc.com> wrote:
|usenet@oneill.net (Clayton O'Neill) wrote:
|> IMHO, both of you are wrong.
|Welcome to the discussion :).

Thanks :)  I started the thread, I figured I should jump in.

|> Transit servers should treat all data
|> following the first \r\n\r\n they find as a byte stream where \r\n.\r\n
|> is the article terminator.  They should escape \r\n. as \r\n.. until they
|> reach the intended end of the article.  Any clients or servers producing
|> articles that don't meet this standards are broken.
|
|I think we all agree on that.  Well, the idea of not processing the headers
|as a byte stream is a new twist, but I don't think we need to get into
|that.

Well, headers do have max line lengths in many implmentations and they have
to be parsed as lines so it doesn't make sense to treat it the same.

|> I don't care what rfc977 says, this is the BCP, and is what both INN and
|> Highwind products do to the best of my knowledge.
|
|And it's what Diablo does as well.
|
|> Matt, I have no idea what you're talking about wrt to LF escaping, but I
|> can assure you that INN does no such thing.
|
|The issue is that Diablo (and old INN etc) converts this NNTP byte stream
|into Unix format text files which have lines ending in a signle LF when
|it's stored.  And it does this by mapping all CRLF pairs in the NNTP byte
|stream into a single LF.  Matt sees that is the "correct" way to "recover"
|the true "raw" article from the NNTP byte stream.  It's what all current
|transports do.

Yah, I looked at the code this evening.  It's mangling articles.

|So, if one day, we wanted to send raw 8 bit data over this NNTP stream,
|Matt expects the raw data to likewise be LF -> CRLF encoded by the client
|before it's sent. That way, when he does the CRLF -> LF translation before
|storage, he will end up with exactly the same raw article that the original
|client started with.  To Matt, it seems that this LF -> CRLF encoding by
|the client and the CRLF -> LF decoding is just a standard part of the NNTP
|protocol.

Clients don't currently do this code for base 64 encoding and some of them
don't do it for text (wintel platforms).  This is a unixism.

|I've never looked at that way.  I've always seen this as just a Unix EOL
|convention and one that other servers would likely do differently.  But
|because Matt has seen this as the correct way to do NNTP, his assumption
|seems to be that any server that doesn't do it this way is broken and
|needs to be fixed (it's not following the NNTP protocol).

The NNTP protocol states that lines are terminated with CRLF.  By
definition, LF coming across the wire doesn't terminate the line. 
Regardless, none of this applies to Content-Transfer-Encoding: binary. 
Nothing else does it the way that Matt describes, I'm really surprised that
this issue hasn't come up before.  

|But at the same time, as I've thought about this, I've come to realize that
|the real issue is that NNTP news servers (transports and readers) need to
|store articles in wire format (i.e. with the CR LF).  If they do that (like
|INN is now doing), then this whole issue of encoding becomes a client issue
|and not a server issue.  So that moves the issue out of the relm of NNTP
|servers (and NNTP RFCs) and into the relm of newsreaders and article format
|RFCs (which I think is where this issue belongs).

Servers that are going to transit or serve messages must store the article
in some form that let's them preserve the wire encoding.  I don't care how
it's done, but it must preserve the original article.  Converting LF's to
CRLF's will cause line breaks that were not in the original article.

As far as wireformat goes, I think Diablo is the only thing that doesn't use
it now.  It's a hell of a lot more efficent to mmap() an article and then
write() it out to the net than to parse every line.  Especially if you
MADV_DONTNEED on OS's that support it.

-- 
coneill@rcn.com|blahlblahblah@oneill.net

Technical Details
Message-ID: <slrn6rtgjr.qn.usenet@hmmm.colo.erols.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!not-for-mail
References: <slrn6qs63j.8b9.usenet@hmmm.colo.erols.net> <19980728010652.281$Rf@newsreader.com> <6pjqjp$hdl$1@flea.best.net> <19980728133745.073$Lq@newsreader.com> <6plakh$j51$1@flea.best.net> <19980728184343.123$fa@newsreader.com> <slrn6rtb90.qn.usenet@hmmm.colo.erols.net> <19980729021141.027$uK@newsreader.com>

Show Full Headers
Complete Article Headers
Message-ID: <slrn6rtgjr.qn.usenet@hmmm.colo.erols.net>
Subject: Re: REPOST: Re: Content-Transfer-Encoding: binary
Date: Wed, 29 Jul 1998 00:00:00 +0000
From: usenet@oneill.net (Clayton O'Neill)
References: <slrn6qs63j.8b9.usenet@hmmm.colo.erols.net> <19980728010652.281$Rf@newsreader.com> <6pjqjp$hdl$1@flea.best.net> <19980728133745.073$Lq@newsreader.com> <6plakh$j51$1@flea.best.net> <19980728184343.123$fa@newsreader.com> <slrn6rtb90.qn.usenet@hmmm.colo.erols.net> <19980729021141.027$uK@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!not-for-mail
X-Deja-AN: 375910640
X-Complaints-To: abuse@rcn.com
X-Trace: winter.news.erols.com 901694180 8409 207.96.1.5 (29 Jul 1998 06:36:20 GMT)
Organization: RCN Internet
Newsgroups: news.software.readers,news.software.nntp