Article View: news.software.nntp
Article #30116Re: REPOST: Re: Content-Transfer-Encoding: binary
From: Curt Welch
Date: Tue, 28 Jul 1998 00:00
Date: Tue, 28 Jul 1998 00:00
181 lines
9765 bytes
9765 bytes
dillon@best.net (Matt Dillon) wrote:
> No, Curt, your wrong... what you are talking about is a function of
> a news CLIENT.
I've talked about what the client does only to help you understand why
your TRANSIT software isn't completely 8 bit clean. Bit since this only
makes you think I'm dense, I'll try to leave those examples out.
> It is
> making the decision to strip the CR from the original article, and
> then encoding the resulting LF-only article as per the NNTP protocol
> (LF -> CRLF).
I now see that this is what is confusing you.
You seem to think that somewhere in the NNTP protocol, there's a concept of
an "LF-only article" that must go though an LF -> CRLF conversion. Please,
show me where in any RFC that is talked about. The fact that you think
this is part of the standard NNTP protocol is what's blinding you to my
point. It's not part of any standard. It is something that inn has always
done and it is something Diablo is doing, but it's not something that
Cyclone is doing (the only real 8 bit clean TRANSIST software on the
planet?).
There was a time in the history of Usenet where the article format was
"defined" as lines ending in LF. This was the required format for
transporting articles over UUCP. But starting with the creation of
NNTP, this standard vanished.
Just to be sure, I re-read this NNTP document:
ftp://ftp.academ.com/pub/nntp/ietf/nntpext.txt
In it, it says nothing about how Usenet articles are encoded. It only
talks about the CRLF line terminators and the leading . issue. There
is NOTHING in the NNTP protocol that talks about traslating LF to CRLF.
So then I checked out son-of-1036:
http://www.chemie.fu-berlin.de/outerspace/netnews/son-of-1036.html
It defines articles made up of lines which end in an abstract EOL marker,
which may vary from system to system. It says NOTHING to make me assume
that all transports should be expected to do the LF->CRLF translation that
you have decided is part of the standard. As I keep saying, this is a
conversion done on Unix and Unix-like systems to convert from the NNTP CRLF
EOL convention to the Unix LF EOL convention. There are NO standards that I
can find that say Usenet articles have lines which end with LF.
But it also has comments like:
NOTE: 8-bit enthusiasts are warned that not all software conforms to
these recommendations yet. In particular, standard NNTP [rrr] is a 7-bit
protocol, and there may be implementations which enforce this rule. Be
warned, also, that it will never be safe to send raw binary data in the
body of news articles, because changes of EOL representation may (will!)
corrupt it.
The part about the EOL representaion issues are exactly the point I'm
getting at. You have made the assumption that all TRANSPORTS and
CLIENTS (sorry have to touch on this) will use your LF->CRLF translation.
This just isn't the way it works any more.
I agree with you that if you stick with the LF EOL convention as the
standard and put the data though the LF->CRLF conversion before sending it
over NNTP and reverse that afterwards, then INN and Diablo will work fine
and provide a complete 8-bit clean channel for sending binary data. And if
this becomes the standard way of encoding Usenet articles when they are
sent of NNTP, then any client on any platform can deal with that and make
it work. I understand that. And I understand that the way you have
written Diablo, your spool files can contain arbitrary binary data, and
that when those articles are sent to another Diablo or INN server which
does the same LF->CRLF translations, the file will end up on the other
server bit for bit the same (ignoring the Path: etc of course).
But my point, as always, has been that this LF->CRLF translation that you
think of as part of the NNTP protocol isn't in fact part of the protocol
and it isn't in fact part of any Usenet message RFC either.
I also checked out the latest USEFOR draft:
http://www.landfield.com/usefor/drafts/draft-ietf-usefor-article-01.txt
In it, I find that they have replaced the abstract EOL concepts from
son-of-1036 with the explicit requirement that all lines MUST end with
CRLF. (get that. Not LF, but CRLF).
This, combined with the NNTP CRLF EOL convention makes it clear to me
that the intent is to REMOVE any confusion caused by EOL conversion
and make it clear that you SHOULD NOT do a LF->CRLF conversion on a
raw 8bit article when sending it over NNTP. And if this becomes the
standard way to encode articles over NNTP, then Diablo will break any
attempt to use binary encoded mime attachements.
But, the new draft also says:
Transmission paths for news articles MUST treat news articles
as uninterpreted sequences of octets, excluding the values 0
(ASCII NUL) and 13 and 10 (ASCII CR and LF, which MUST only
appear in the combination <CRLF> which denotes a line
separator).
Which basically is saying they don't want you to send data with a mime
Transfer-Encoding: of binary. But, if one day, you want to be ready
for doing that anyway, then you need to understand that the most likely way
for it to be done (in my mind and my interpretation of where the
current RFCs are headed) is to NOT expect clients (sorry I have to talk
about clients because they are the ones that do the initial encoding
of the Binary data) to do your LF->CRLF translation. And if that's the
way a Usenet article with a Transfer-Encoding: binary section is sent
over NNTP, then when that article hits a Diablo server, it will be
corrupted.
Once again, if the following character sequence is sent to Diablo on the
NNTP connection (these are the raw characters going over the TCP
connection):
LF CR LF
(and this doesn't violate the NNTP specs), then Diablo will receive
that article, and resend it to the next host as:
CR LF CR LF
and that does violate the concept from the NNTP and Usenet Format
RFCs that say you should pass the data unchanged.
But this same article can travel though a network of Highwind servers
without being corrupted. And it might even make it though a network
of inn 2.0 CNFS servers without being corrupted.
> Are you attempting to
> argue that because a client converts articles on the assumption that
> they are plain text that a feature cannot somehow be added to it to
> allow it to interpret and/or post the articles as straight binary ?
No not at all. I agree that we can send binary data over NNTP if we make
all the clients support it. But what I've spent the last N postings trying
to point out to you is that there are two ways to do this. And the way
most the rest of the world is thinking it should be done doesn't agree with
the way you are expecting it to be done.
I'm not saying that the way you are thinking about this is wrong. If all
clients map binary articles to NNTP the way you expect them to then
everything is fine. But it's very clear to me that this is outside of all
the current RFCs (draft or otherwise) that I have looked at. And it's also
very clear to me that you could change Diablo to make it work for both
formats like Highwind has done with there servers. And if you do that,
then either convention could be used in the future.
If you don't do it, then the only way to get Transfer-Encoding: binary mime
articles though this almost-8-bit clean network is to escape all the LF's
with a preceding CR. But that then assumes the raw article format is using
the LF EOL convention for all lines - which is not what the latest usefor
draft is saying.
I'd also like to point out that this is a very minor point. Most likely,
we will never see wide spread use of binary data in Usenet articles. It
would break (probably to the point of causing core dumps and GPFs) most
current NNTP clients. We might one day see almost-binary encoded data
in Usenet articles which use some well defined technique for escaping
CR LF and NULL to prevent all these types of problems and to provide
backward compatibilty to all current transports and clients. This in
my mind would be a far better solution.
I never ment this to suck up two days of my time. That's why I simple
said:
> There are other OSs in the world besides Unix. Not all servers will
> translate CR LF into LF.
I thought you would get my point, but as of your last posting, you still
don't seem to understant what I'm talking about. Does anyone else out
there understand my point or have I lost everyone in this?
--
Curt Welch http://CurtWelch.Com/
curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<19980728133745.073$Lq@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-mailReferences:
<slrn6qs63j.8b9.usenet@hmmm.colo.erols.net> <19980727203523.032$aP@newsreader.com> <6pjaar$9te$1@flea.best.net> <19980728010652.281$Rf@newsreader.com> <6pjqjp$hdl$1@flea.best.net>Show Full Headers
Complete Article Headers
Message-ID: <19980728133745.073$Lq@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> <19980727203523.032$aP@newsreader.com> <6pjaar$9te$1@flea.best.net> <19980728010652.281$Rf@newsreader.com> <6pjqjp$hdl$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: 375720626
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