🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #30123

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

#30123
From: Curt Welch
Date: Tue, 28 Jul 1998 00:00
90 lines
4815 bytes
dillon@best.net (Matt Dillon) wrote:
> :In article <19980727160307.629$hL@newsreader.com>,
> :Curt Welch <curt@kcwc.com> wrote:
> :>
> :>If Unix based transports translate the NNTP CR LF pair into a LF
> :>because of Unix EOL convetion, what happens when there's a lone LF in
> :>the data?  When
>
>    Curt, I have no idea what you are talking about

>    The *TRANSIT* software and the *NNTP* protocol specification has no
>    problem with 8-bit clean, period.  It never did.  Stop confusing
>    yourself.

Ok.  I'll try again.  I might be missing something, but I'm not confused.
I think we just aren't on the same "page" yet...

If I keep explaing this you will understand what I'm talking about
and either agree with me that there is a problem or you will be able to
explain to me why it isn't a problem.

Yes, the NNTP protocol can transfer binary data if the server is written
correctly (ignoring the forced trailing CR LF issue which is minor).  But
as far as I know, Diablo and inn aren't because they store articles in the
Unix standard format with lines ending in a single LF.  Here's an example.

The following four character sequence gets sent to a Diablo server
in the body of an IHAVE or TAKETHIS (as part of a raw JPEG image):

X LF CR LF

How do you store it on disk?  As:

X LF LF

Right?  Diablo (at least as of version 1.11) and inn (with the traditional
storage format) store articles on disk with the Unix \n end of line
convention.  This translation causes problems when trying to tranport raw
binary data. (I'm not talking about what a client does when it gets the
data, I'm talking about what Diablo does).

When you send it back out to the downstream feed doesn't it end up going
out like this:

X CR LF CR LF

Right?  Did Diablo send the same thing it received?  Can it transport raw
binary data without changing it?  I don't think so.  Please correct me if
I'm wrong.  Have later releases of Diablo changed to a "raw" format where
you store the CR LF to fix this problem?  Is that what I'm missing?

Now, it's possible to work around this limitation by translating all the
LFs in a JPEG image into CR LF pairs before it's sent though a Diablo
transport and then doing the reverse of this on the other side to recover
the raw JPEG image.  So, the above "X LF CR LF" gets translated into
"X CR LF CR CR LF" by the newsreader before posting. I don't think this is
the correct way to deal with the problem, but I ass/u/med this is what you
were talking about in the previous message when you said:

>     Think:  CRLF turns into CR{CRLF} which then gets turned back into
>     CR{LF}.  It works just fine.

So who does this CRLF into CRCRLF translation that you were
talking about?

But this technique won't work if it passes though a server which stores
articles with a CR at the end of each line.  Which is why I said:

> There are other OSs in the world besides Unix.  Not all servers will
> translate CR LF into LF.

Which is the coment that seems to have started this confusion.

Do you see what I'm talking about now?  In order to make transports handle
raw data without inserting extra CRs they must store the article in raw
format and not in their local OS convention end-of-line format.

So, either there is a problem with inn and Diablo relating to what happens
when you have an LF in the data, or Diablo has been fixed so that it stores
articles in true RAW format without doing the Unix CRLF -> LF translation,
or there's some part of NNTP that I don't know about that says you should
translate raw LF characters into CRLF.

So can you now explain to me what I'm missing?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/

Technical Details
Message-ID: <19980727203523.032$aP@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
References: <slrn6qs63j.8b9.usenet@hmmm.colo.erols.net> <19980727114121.703$9g@newsreader.com> <6pie7i$rpn$1@flea.best.net> <19980727160307.629$hL@newsreader.com> <6pintb$1eo$1@flea.best.net>

Show Full Headers
Complete Article Headers
Message-ID: <19980727203523.032$aP@newsreader.com>
Subject: Re: REPOST: Re: Content-Transfer-Encoding: binary
Date: Tue, 28 Jul 1998 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <slrn6qs63j.8b9.usenet@hmmm.colo.erols.net> <19980727114121.703$9g@newsreader.com> <6pie7i$rpn$1@flea.best.net> <19980727160307.629$hL@newsreader.com> <6pintb$1eo$1@flea.best.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
X-Deja-AN: 375496990
X-User: Curt@NewsReader.Com
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
Organization: NewsReader.Com
X-Url: http://CurtWelch.Com/
Newsgroups: news.software.readers,news.software.nntp