🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
41 messages
41 total messages Started by Curt Welch Thu, 16 Jul 1998 00:00
Re: Content-Transfer-Encoding: binary
#29830
Author: Curt Welch
Date: Thu, 16 Jul 1998 00:00
40 lines
2779 bytes
[news.software.nntp added to Newsgroups:]

usenet@oneill.net (Clayton O'Neill) wrote:
> I've been wondering for a while why an effort hasn't been made to make
> readers and transport servers 8-bit clean and switch to
> Content-Transfer-Encoding: binary for alt.binaries.*.  Most of the
>   transport
> software is 8 bit clean now, but I imagine a lot of the readers aren't,
> but I imagine we'd see a mass conversion to any readers that did support
> binary correctly, if for no other reason because of the decrease in
> download times.

Raw binary would only reduce the size by 25%.  I doubt if that's enough of
a savings to cause any type of conversion.  I think the problems we would
see when people posted with a raw binary format would far outweigh the
savings in download times.

And just because servers are 8 bit clean doesn't mean they can correctly
deal with raw data.  INN can't.  NNTP is a line oriented protocol.  When
you feed nnrpd an article with a POST command it must have lines less
than 1000 characters in length.  If you feed it raw data, everything past
character 1000 is ignored until it hits EOF or sees a \r\n.  I don't
think Usenet is ready for raw binary data in articles.  You would really
have to modify NNTP to include a Content-Length somehow on POST and IHAVE
and TAKETHIS commands (or expect the servers to parse (and trust) the
Mime headers - which is not the way to go).

For that matter, looking at the code, nnrpd isn't even 8 bit clean for
POSTS.  It uses NUL to mark the end of the line.  I don't know about
how innd works with IHAVE/TAKETHIS.

Of course having a content length argument on the IHAVE/CHECK/POST commands
would have the nice side effect of allowing servers to reject articles
based on size before they were received.

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

Re: Content-Transfer-Encoding: binary
#29852
Author: Curt Welch
Date: Thu, 16 Jul 1998 00:00
67 lines
4488 bytes
usenet@oneill.net (Clayton O'Neill) wrote:
> If I were downloading mb's of binaries at 28.8 or 33.6 I think I'd
> switch. Hell, people went out and bought 33.6 and 56k modems for less
> gain in many cases.

Well, yes, a 25% increase in performance is enough to justify some effort.
But because it requires us to first get a large number of transports
working, then to get a large number of readers working, then to convence
people to post in binary even though some percentage of the transports and
readers won't be able to deal with the message.

I don't think the performance boost and disk savings is enough to encourage
all this to happen (at least not any time soon).  And disk space and
bandwidth can be saved using compression so that reduces the need to make
binary postings work.  And modems do compression now so what happens when
you send binary data instead of uuencoded data over that link?  How much
faster does it really go for the end user?

> INN 2.0, Cyclone and Typhoon treat the article body as a bytestream.
> They only do \r\n. escaping and \r\n.\r\n detection, and do that on a
> byte stream basis, not a line per line bases.

INN 2.0 might do that for IHAVE/TAKETHIS, but it (nnrpd) doesn't do it for
POST commands.  see READline() in nnrpd/misc.c.  Clearly though, that
could be fixed as well.  But it would have to be done before we could ever
expect newsreaders to try posting binary data.

Also, even if the data is processed as a binary stream the NNTP end-of-data
marker '\r\n.\r\n' assumes that the first \r\n is part of the data - and
there's no getting around that.  i.e. anything you try to send will end up
with a \r\n on the end of it whether you wanted it or not.

This means a single part mime post of type binary will get a \r\n added
to the end of the article (after the data) when it really shouldn't be
there.

The HTTP POST command has suffered from the same historic problem and it's
caused no end of bugs.  Old servers expected a CR LF after the data so
clients send it, but new servers don't need it to be there, but if they
don't suck up the extra two bytes that clients send you get performance
issues. And then when servers started sending resets to close the
connection quickly (after the data but before eating the extra CR LF) this
triggerd a bug in the way some Microsoft libraries sent post data (the
connection could get killed before the \r\n was sent - which cuased
connection error messages to pop up - but only on large posts where the
\r\n ended up in a separate TCP packet. etc. etc.

If you try to pretend that NNTP "works" for sending arbitrary binary data
and ignore this issue, you are likely to end up with similar interoperation
bugs between servers and clients.

> This isn't an RFC977 issue at all. IMHO, it's an RFC1036.  NNTP should
> not care at all about the body of what it's transporting.

That would be nice, but the \r\n.\r\n stuff means it does (at least
the last two characters).  There's no getting around this without changing
the protocol.  Not to mention the fact that way the NNTP RFC is written
people will naturally tend to assume it's a line orented protocol and write
code that will not work correctly for binary data (especially newsreader
authors).  If we want to send binary data in posts I'm pretty sure a
re-write of the RFCs is going to be required before we can make it work.

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

Re: Content-Transfer-Encoding: binary
#29864
Author: Clayton O'Neill
Date: Thu, 16 Jul 1998 00:00
52 lines
3211 bytes
On 16 Jul 1998 17:42:43 GMT, Curt Welch <curt@kcwc.com> wrote:
|[news.software.nntp added to Newsgroups:]
|
|usenet@oneill.net (Clayton O'Neill) wrote:
|> I've been wondering for a while why an effort hasn't been made to make
|> readers and transport servers 8-bit clean and switch to
|> Content-Transfer-Encoding: binary for alt.binaries.*.  Most of the
|>   transport
|> software is 8 bit clean now, but I imagine a lot of the readers aren't,
|> but I imagine we'd see a mass conversion to any readers that did support
|> binary correctly, if for no other reason because of the decrease in
|> download times.
|
|Raw binary would only reduce the size by 25%.  I doubt if that's enough of
|a savings to cause any type of conversion.  I think the problems we would
|see when people posted with a raw binary format would far outweigh the
|savings in download times.

If I were downloading mb's of binaries at 28.8 or 33.6 I think I'd switch. 
Hell, people went out and bought 33.6 and 56k modems for less gain in many
cases.  

|And just because servers are 8 bit clean doesn't mean they can correctly
|deal with raw data.  INN can't.  NNTP is a line oriented protocol.  When
|you feed nnrpd an article with a POST command it must have lines less
|than 1000 characters in length.  If you feed it raw data, everything past
|character 1000 is ignored until it hits EOF or sees a \r\n.  I don't
|think Usenet is ready for raw binary data in articles.  You would really
|have to modify NNTP to include a Content-Length somehow on POST and IHAVE
|and TAKETHIS commands (or expect the servers to parse (and trust) the
|Mime headers - which is not the way to go).

INN 2.0, Cyclone and Typhoon treat the article body as a bytestream.  They
only do \r\n. escaping and \r\n.\r\n detection, and do that on a byte stream
basis, not a line per line bases.

|For that matter, looking at the code, nnrpd isn't even 8 bit clean for
|POSTS.  It uses NUL to mark the end of the line.  I don't know about
|how innd works with IHAVE/TAKETHIS.


|Of course having a content length argument on the IHAVE/CHECK/POST commands
|would have the nice side effect of allowing servers to reject articles
|based on size before they were received.

This isn't an RFC977 issue at all. IMHO, it's an RFC1036.  NNTP should not
care at all about the body of what it's transporting.

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

Re: Content-Transfer-Encoding: binary
#29887
Author: Kjetil Torgrim Homme
Date: Fri, 17 Jul 1998 00:00
13 lines
1201 bytes
If the new article-format-draft passes, why not design a replacement
for uu/base64 coding instead?  You can make longer lines and only need
to escape three characters (NUL, CR and NL).  This makes the issue a
problem for the readers only[1], and cost a negligble amount of
bandwidth (an average of 1.4% if I calculate correctly).


Kjetil T.

[1] The support may even be put in auxilliary programs, the way
    uucoding was handled on Unix in the old days.

Re: Content-Transfer-Encoding: binary
#29891
Author: Brian Edmonds
Date: Fri, 17 Jul 1998 00:00
15 lines
2153 bytes
Clayton O'Neill <usenet@oneill.net> writes:
>> Raw binary would only reduce the size by 25%.
> If I were downloading mb's of binaries at 28.8 or 33.6 I think I'd
> switch.

But most of these modems already do compression.  In my experience this
means you get only marginally better throughput of raw data over uu or
base64 encoded.  It's not really noticeable.

-- 
 o         Brian Edmonds <bedmonds@cs.ubc.ca>, Team Jubal Mech Labs
 \\_/\_,   Moderator: rec.arts.anime.creative, rec.music.info/reviews
(*)   (*)  Are you tired of spam?  Visit http://www.spam.abuse.net/spam/

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30027
Author: Greg Berigan
Date: Sun, 26 Jul 1998 00:00
73 lines
4125 bytes
In news.software.readers, dillon@best.net (Matt Dillon) wrote:
>Greg Berigan <gberigan@cse.unl.edu> wrote:

>> Unencoded binaries just aren't possible.  There must be at least some
>> escaping of characters and character sequences.  The CR, LF, and NUL
>> characters would have to be escaped, CRLFs would have to be put in the
>> message to comply with line length restrictions (every 72 bytes IMO) and
>> have no significance by receiving software.  The character used to
>> escape these characters would need to be escaped itself.

> Unencoded binaries are certainly possible.  I know of no line length
> restrictions... certainly Diablo, INN, DNews, and Cyclone don't have
> any.

Guess again.  1000 byte line buffers, including CRLF and
string-terminating NUL.

> You have to escape certain things in the protocol (LF->CRLF,
> lines beginning with dots .->..) that the other side unescapes
> (CRLF->LF, ..->. at the beginning of a line), and you have terminate
> the article with a CRLF in order for the following '.' terminator to work.

And if the binary also has "CRLF.." sequences in it, what then?  Would
it get pass into the system without change but be translated back
inappropriately as "LF."?

> You do NOT have to escape NULs or any other characters ( even though
> some older software can't deal with them... well too bad! ).

Yeah, that just means a lot of people downstream from such a site (which
can be a majority if it is a close upstream site to you) will get lines
that are mysteriously truncated because some software thought the NUL
was the end of the string.

> It is certainly possible to maintain the article in binary form on both
> the source and destination systems.  The escaping only occurs in the
> transfer protocol.

>> To be good for the net as a whole, 0x00 to 0x1F and 0x80 to 0x9F should
>> be escaped due to potential problems with these characters if they get
>> displayed raw.

> This is a problem for the news client and should not be addressed in
> the news transfer protocols or the NNTP protocol.

So everyone must upgrade their readers to suppress display of raw binary
posts?  Take a look how many people still use TIN 1.2 PL2 or earlier.

>> The time of legitimate, non-porn, non-spam binary content on Usenet is
>> virtually dead.  See the ghost-towns of comp.binaries.*.

> Yup.  Virtually all legitimate binary distributions have moved off of
> USENET and onto the web.

Or FTP.

So why should we care about creating a clean protocol for (on the whole
illegal) binary content on Usenet?  There's nothing left deserving that
support, only the support demanded under threat of feed-swamping binary
traffic which continues to grow.

We may have come to the point where, unless the binary article is posted
to a moderated group, it should be refused propogation.  Since its lack
of moderation is what keeps comp.binaries.apple2 alive where Mac and PC
binaries groups are dead, this is a hard thing to do.

-- 
         ,=<#)-=#  <http://incolor.inetnebr.com/wotw/> (The War of the Worlds)
    ,_--//--_,
 _-~_-(####)-_~-_   Please pardon any typos.  Bandwidth is often at a premium,
(#>_--'~--~`--_<#)  with connection too sluggish to support post-editing.

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30031
Author: Matt Dillon
Date: Sun, 26 Jul 1998 00:00
107 lines
5589 bytes
:In article <6pga50$olf$1@unlnews.unl.edu>,
:Greg Berigan  <gberigan@cse.unl.edu> wrote:
:>In news.software.readers, dillon@best.net (Matt Dillon) wrote:
:>>Greg Berigan <gberigan@cse.unl.edu> wrote:
:>
:>>> Unencoded binaries just aren't possible.  There must be at least some
:>>> escaping of characters and character sequences.  The CR, LF, and NUL
:>>> characters would have to be escaped, CRLFs would have to be put in the
:>>> message to comply with line length restrictions (every 72 bytes IMO) and
:>>> have no significance by receiving software.  The character used to
:>>> escape these characters would need to be escaped itself.
:>
:>> Unencoded binaries are certainly possible.  I know of no line length
:>> restrictions... certainly Diablo, INN, DNews, and Cyclone don't have
:>> any.
:>
:>Guess again.  1000 byte line buffers, including CRLF and
:>string-terminating NUL.

    ??Where?  Not in any of the major news transit systems that 
    I know of there isn't.

    Of course, clients are a different matter...  but adding binary support
    to the clients would follow relatively quickly if a standard were devised.

:>> You have to escape certain things in the protocol (LF->CRLF,
:>> lines beginning with dots .->..) that the other side unescapes
:>> (CRLF->LF, ..->. at the beginning of a line), and you have terminate
:>> the article with a CRLF in order for the following '.' terminator to work.
:>
:>And if the binary also has "CRLF.." sequences in it, what then?  Would
:>it get pass into the system without change but be translated back
:>inappropriately as "LF."?

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

    I know this works because I've tested it.  Hell, I *WROTE* Diablo.
    I ought to know, eh ?

:>> You do NOT have to escape NULs or any other characters ( even though
:>> some older software can't deal with them... well too bad! ).
:>
:>Yeah, that just means a lot of people downstream from such a site (which
:>can be a majority if it is a close upstream site to you) will get lines
:>that are mysteriously truncated because some software thought the NUL
:>was the end of the string.

    If some odd piece of transit software can't handle the feed, it blows
    up.  Dude, people are ALREADY sending NUL's in articles.   Sites running
    transit software have already had to upgrade and those that don't get
    mired in backed-up and non-working feeds, or corrupted articles, every
    week or two.

:>> This is a problem for the news client and should not be addressed in
:>> the news transfer protocols or the NNTP protocol.
:>
:>So everyone must upgrade their readers to suppress display of raw binary
:>posts?  Take a look how many people still use TIN 1.2 PL2 or earlier.

    Hey, if you want the binary you'll upgrade your reader.  If not, you 
    are S.O.L.  That's how it has always worked.

    Since you aren't interested in binaries, you don't have to worry.  Just
    don't download anything with the title 'Pamela anderson BIG GIF 
    Part 01/55".

    What you are arguing here is basically "Since some of the code out
    there is broken we therefore should not ever in the future of the
    USENET implement new standards to fix the problems" (my quote).  That's 
    a bullshit argument that doesn't fly.

:>> Yup.  Virtually all legitimate binary distributions have moved off of
:>> USENET and onto the web.
:>
:>Or FTP.

    Same difference.

:>So why should we care about creating a clean protocol for (on the whole
:>illegal) binary content on Usenet?  There's nothing left deserving that
:>support, only the support demanded under threat of feed-swamping binary
:>traffic which continues to grow.

    8 bit clean is a goal that a lot of people have had for a long time.
    uucp/uucico had it, then we lost it with NNTP, now we are close to getting
    it back again.  What *SOME* people may use the capability for is not
    a good enough reason to scrap it as an overall goal.   There are many
    other reasons to support 8-bit clean, including being able to handle
    UNICODE and other multi-lingual encoding schemes straight.  There are 
    many groups that already use the fact that most transit systems are
    8-bit clean.

					-Matt

:>         ,=<#)-=#  <http://incolor.inetnebr.com/wotw/> (The War of the Worlds)
:>    ,_--//--_,
:> _-~_-(####)-_~-_   Please pardon any typos.  Bandwidth is often at a premium,
:>(#>_--'~--~`--_<#)  with connection too sluggish to support post-editing.


-- 
    Matthew Dillon  Engineering, HiWay Technologies, Inc. & BEST Internet
                    Communications
    <dillon@best.net> (Please include original email in any response)

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30033
Author: Brad Templeton
Date: Sun, 26 Jul 1998 00:00
18 lines
1549 bytes
In article <REPOST-16907.4840087891.982330322266.37emvkh3go.fsf@cascade.cs.ubc.ca>,
Brian Edmonds  <bedmonds@cs.ubc.ca> wrote:
>Clayton O'Neill <usenet@oneill.net> writes:
>>> Raw binary would only reduce the size by 25%.
>> If I were downloading mb's of binaries at 28.8 or 33.6 I think I'd
>> switch.
>
>But most of these modems already do compression.  In my experience this
>means you get only marginally better throughput of raw data over uu or
>base64 encoded.  It's not really noticeable.

It's still a pointless 33% increase in traffic over regular internet data
pipes, and on disks.   I'm pushing for binary as the last new transfer
encoding.
-- 
	Brad Templeton			http://www.templetons.com/brad/

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30035
Author: Francois Ranchin
Date: Sun, 26 Jul 1998 00:00
17 lines
1782 bytes
On 26 Jul 1998 16:48:33 GMT, Greg Berigan <gberigan@cse.unl.edu> wrote:
> The time of legitimate, non-porn, non-spam binary content on Usenet is
> virtually dead.  See the ghost-towns of comp.binaries.*.

Perhaps your are confusing usenet and the web. Now there is more reasons
to refuse binary and porn on usenet. There is no good reason
to force the replication of a fucking .mp3 file of 8mo through
200.000 usenet site. If you want a CD-ROM : go to the mall or the virtual
mall. If you want porn : go to the sex-shop. Why ALWAYS usenet ?

Why not to send only the URL with where to find the song instead of the song 
itself ?

-- 
Fran�ois Ranchin, 

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30037
Author: Greg Berigan
Date: Sun, 26 Jul 1998 00:00
38 lines
2510 bytes
In news.software.readers, bt@templetons.com (Brad Templeton) wrote:
>Brian Edmonds  <bedmonds@cs.ubc.ca> wrote:
>>Clayton O'Neill <usenet@oneill.net> writes:

>>>> Raw binary would only reduce the size by 25%.

>>> If I were downloading mb's of binaries at 28.8 or 33.6 I think I'd
>>> switch.

>> But most of these modems already do compression.  In my experience this
>> means you get only marginally better throughput of raw data over uu or
>> base64 encoded.  It's not really noticeable.

> It's still a pointless 33% increase in traffic over regular internet data
> pipes, and on disks.   I'm pushing for binary as the last new transfer
> encoding.

Unencoded binaries just aren't possible.  There must be at least some
escaping of characters and character sequences.  The CR, LF, and NUL
characters would have to be escaped, CRLFs would have to be put in the
message to comply with line length restrictions (every 72 bytes IMO) and
have no significance by receiving software.  The character used to
escape these characters would need to be escaped itself.

To be good for the net as a whole, 0x00 to 0x1F and 0x80 to 0x9F should
be escaped due to potential problems with these characters if they get
displayed raw.

The time of legitimate, non-porn, non-spam binary content on Usenet is
virtually dead.  See the ghost-towns of comp.binaries.*.

-- 
         ,=<#)-=#  <http://incolor.inetnebr.com/wotw/> (The War of the Worlds)
    ,_--//--_,
 _-~_-(####)-_~-_   Please pardon any typos.  Bandwidth is often at a premium,
(#>_--'~--~`--_<#)  with connection too sluggish to support post-editing.

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30038
Author: Matt Dillon
Date: Sun, 26 Jul 1998 00:00
61 lines
3541 bytes
:In article <6pfml1$jca$1@unlnews.unl.edu>,
:Greg Berigan  <gberigan@cse.unl.edu> wrote:
:>In news.software.readers, bt@templetons.com (Brad Templeton) wrote:
:>>Brian Edmonds  <bedmonds@cs.ubc.ca> wrote:
:>>>Clayton O'Neill <usenet@oneill.net> writes:
:>
:>>>>> Raw binary would only reduce the size by 25%.
:>
:>>>> If I were downloading mb's of binaries at 28.8 or 33.6 I think I'd
:>>>> switch.
:>
:>>> But most of these modems already do compression.  In my experience this
:>>> means you get only marginally better throughput of raw data over uu or
:>>> base64 encoded.  It's not really noticeable.
:>
:>> It's still a pointless 33% increase in traffic over regular internet data
:>> pipes, and on disks.   I'm pushing for binary as the last new transfer
:>> encoding.
:>
:>Unencoded binaries just aren't possible.  There must be at least some
:>escaping of characters and character sequences.  The CR, LF, and NUL
:>characters would have to be escaped, CRLFs would have to be put in the
:>message to comply with line length restrictions (every 72 bytes IMO) and
:>have no significance by receiving software.  The character used to
:>escape these characters would need to be escaped itself.

    Unencoded binaries are certainly possible.  I know of no line length
    restrictions... certainly Diablo, INN, DNews, and Cyclone don't have
    any.  You have to escape certain things in the protocol (LF->CRLF,
    lines beginning with dots .->..) that the other side unescapes
    (CRLF->LF, ..->. at the beginning of a line), and you have terminate
    the article with a CRLF in order for the following '.' terminator to work.
    You do NOT have to escape NULs or any other characters ( even though
    some older software can't deal with them... well too bad! ).

    It is certainly possible to maintain the article in binary form on both
    the source and destination systems.  The escaping only occurs in the
    transfer protocol.

:>To be good for the net as a whole, 0x00 to 0x1F and 0x80 to 0x9F should
:>be escaped due to potential problems with these characters if they get
:>displayed raw.

    This is a problem for the news client and should not be addressed in
    the news transfer protocols or the NNTP protocol.

:>The time of legitimate, non-porn, non-spam binary content on Usenet is
:>virtually dead.  See the ghost-towns of comp.binaries.*.
:>

    Yup.  Virtually all legitimate binary distributions have moved off of
    USENET and onto the web.

						-Matt

-- 
    Matthew Dillon  Engineering, HiWay Technologies, Inc. & BEST Internet
                    Communications
    <dillon@best.net> (Please include original email in any response)

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30039
Author: Greg Berigan
Date: Sun, 26 Jul 1998 00:00
34 lines
2383 bytes
In news.software.readers, fyr@oleane.net (Francois Ranchin) wrote:
>Greg Berigan <gberigan@cse.unl.edu> wrote:

>> The time of legitimate, non-porn, non-spam binary content on Usenet is
>> virtually dead.  See the ghost-towns of comp.binaries.*.

> Perhaps your are confusing usenet and the web.

No I'm not.  Perhaps you are confusing me with someone who likes the
above fact.  Alas, the pre-feed broadcast nature of Usenet coupled with
the ease of anonymity at both ends makes it a lot more attractive means
to distribute and retrieve pornographic and pirated materials, as well
as the load distribution.

Meanwhile, except for the platforms unsupported by their manufacturers,
shareware and freeware binary distribution under comp.binaries.* (and
moreso comp.sources.*) is dead, supplanted by FTP sites and direct web
distribution.  More controversial binaries are either under lock and key
or sent through Usenet.

> Why not to send only the URL with where to find the song instead of the song 
> itself ?

Fear of prosecution, or loss of service due to sudden load demands, are
usually compelling reasons for those who send them and those wanting
them.

-- 
         ,=<#)-=#  <http://incolor.inetnebr.com/wotw/> (The War of the Worlds)
    ,_--//--_,
 _-~_-(####)-_~-_   Please pardon any typos.  Bandwidth is often at a premium,
(#>_--'~--~`--_<#)  with connection too sluggish to support post-editing.

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30040
Author: Matt Dillon
Date: Mon, 27 Jul 1998 00:00
69 lines
4367 bytes
:In article <19980728010652.281$Rf@newsreader.com>,
:Curt Welch <curt@kcwc.com> wrote:
:>dillon@best.net (Matt Dillon) wrote:
:>>     If the original article as written in someone's text editor is this:
:>>
:...
:>that's done on _UNIX_ systems to convert the Unix format text files to NNTP
:>format text files.
:>
:>If I create a text file on a PC (which I try not to do :)), then the lines
:>already end in CR LF.  So when I send the file to an NNTP server with a
:>POST command, I don't map the LF's to CR LFs.  If that file has an imbeded
:>raw JPEG file, then I also don't expect to do any type of translating of
:>characters. I'd just expect to send it in it's raw format.  But if I do
:>that, then Diablo will corrupt the file by adding a CR in front of any LF
:>that didn't already have one.
:>
:>If the text file was created on a Mac, then the lines would end with a
:>single CR.  So the code that reads this format file and sends it with an

    No, Curt, your wrong... what you are talking about is a function of 
    a news CLIENT.  It has nothing whatsoever to do with news TRANSIT 
    software and it has nothing whatsoever to do with this thread which
    is discussing 8-bit clean binary postings... these postings are most
    definitely *NOT* plaintext.  *obviously* the client needs to understand
    the difference, which is as simple as an X- or a MIME header.

    The news CLIENT is *interpreting* the article you are posting as a text
    message in USENET plaintext form rather then as a binary.  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).
    Even though this winds up a wash for articles that were original CRLF
    to begin with in regards to the protocol, the client is *NOT* posting
    the article verbatim in this case.  The client has decided to strip the
    CR.  Stripping the CR is perfectly acceptable if the client is not trying
    to post binary data.  But this is the CLIENTs decision, not the rest of
    the NNTP system.

    News *TRANSIT* systems do no such interpretation.  I've been trying to 
    explain the distinction to you for three postings now.  Please sit back
    and think about it for a while before you respond.  You aren't 
    understanding the distinction.

    There are two distinct pieces... there's the news client which 
    interprets the data, either on reception or when you post something,
    and there's the news transit which transfers the article between systems.

    You are talking about the news *CLIENT* here.   You comments have 
    absolutely nothing whatsoever to do with 8-bit clean binary postings.

    Please keep in mind what this thread is talking about ... we are talking
    about dealing with BINARY POSTINGS.  We are not talking about making 
    interpretations of textual articles.  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 ?

    Curt, please understand the distinction... you are stuck in this CR LF
    conversion crap and it's non-problem.  8-bit-clean works across most of
    the USENET backbone now.

					-Matt

-- 
    Matthew Dillon  Engineering, HiWay Technologies, Inc. & BEST Internet
                    Communications
    <dillon@best.net> (Please include original email in any response)

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30046
Author: Curt Welch
Date: Mon, 27 Jul 1998 00:00
58 lines
3896 bytes
dillon@best.net (Matt Dillon) wrote:
>     ?? 'other OS's'?  The OS has nothing to do with it.

CRLF -> LF has nothing to do with the Unix EOL convention ????

>     translations are not something the OS does in the case, they are
>     something the news transit software does.

>     Let me put it this way:
>     The backbones have been moving to 8-bit clean for several years now.
>     Any systems that can't handle it are going to be (and many have
>     already been) S.O.L.  Whether you like it or not.

Whether I like it?  I'm not against it.  (I'm also not the one who started
this tread with you in case you missed that).  It just sounds to me like
what you are talking about just won't work unless it's made a standard and
all the transports are forced to follow the same procedure.

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
it's sent back out by NNTP does it get translated into CRLF?  If it does,
then you can "trick" that system into accepting and passing clean binary
data by doing a LF->CRLF translation before the first injection (like you
mentioned).  The file as stored on Unix will be in the correct binary
format (i.e. a jpeg image could be read out of the file with no character
translations).

But what if there's a Mac based transport that's also 8 bit clean, but it
translates CR LF into CR for local storage and does the inverse on
transmitting?  For that transport (does one exist?) you would have to do
CR -> CRLF translation before injecting the binary article to keep the
transport from corrupting the article as it passed through.  Your
(Unix based) LF->CR LF pre-translation trick wouldn't work for this server.

Then there are the Windows/NT and VMS based servers.  I'd expect them to
leave the CR LF as a CR LF.  They at least will not corrupt the data (i.e.
they are likely to send it as it was received), but on their local storage
the binary data won't be correct because they didn't do the CR LF -> LF
translation.  They would tend to "expect" raw data to be "raw" data and not
have any strange LF -> CRLF done to it before hand.

So, we have Unix based servers that would like to see the raw data
translated with a LF -> CR LF before it's first sent, Mac based servers
(I've never heard of one so this might not be an issue) that need a CR ->
CR LF, and NT like servers that don't want any translation done.  These
can't all live togther and "work" correctly for arbitrary binary data
unless there's a clear standard about how this should be done.  Is there
one?

>     It's entirely out of your control.

A lot of things are :)

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

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30049
Author: Matt Dillon
Date: Mon, 27 Jul 1998 00:00
31 lines
1941 bytes
:In article <19980727114121.703$9g@newsreader.com>,
:Curt Welch <curt@kcwc.com> wrote:
:>dillon@best.net (Matt Dillon) wrote:
:..
:>>     I know this works because I've tested it.  Hell, I *WROTE* Diablo.
:>>     I ought to know, eh ?
:>
:>There are other OSs in the world besides Unix.  Not all servers will
:>translate CR LF into LF.
:>
:>-- 
:>Curt Welch                                            http://CurtWelch.Com/
:>curt@kcwc.com                          Webmaster for http://NewsReader.Com/

    ?? 'other OS's'?  The OS has nothing to do with it.  CRLF translations are
    not something the OS does in the case, they are something the news
    transit software does.  Let me put it this way:  The backbones have been
    moving to 8-bit clean for several years now.  Any systems that can't 
    handle it are going to be (and many have already been) S.O.L.  Whether
    you like it or not.  

    It's entirely out of your control.

					-Matt

-- 
    Matthew Dillon  Engineering, HiWay Technologies, Inc. & BEST Internet
                    Communications
    <dillon@best.net> (Please include original email in any response)

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30051
Author: Matt Dillon
Date: Mon, 27 Jul 1998 00:00
30 lines
2230 bytes
: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.  You are massively 
   confusing the subject of the conversation (8-bit clean) with differences
   in the way clients interpret the article data once they've retrieved it.

   The *TRANSIT* software and the *NNTP* protocol specification has no 
   problem with 8-bit clean, period.  It never did.  Stop confusing yourself. 
   What your client software does to display an article has nothing whatsoever
   to do with the NNTP protocol.  Zilcho.  It doesn't matter whether it's 
   a UNIX server or a Windows box or a MAC or a homebrew.  The NNTP protocol
   is very clear on how to transfer articles back and forth.  Articles are
   transfered verbatim... NO TRANSLATION IS DONE TO THE ARTICLE BODY BY THE 
   NNTP PROTOCOL.  It says nothing (nor should it) as to the format of the
   content of the article.  As far as NNTP is concerned, it's 8-bit clean.

   What reader's do with that 8-bit clean article is another matter.

					-Matt

-- 
    Matthew Dillon  Engineering, HiWay Technologies, Inc. & BEST Internet
                    Communications
    <dillon@best.net> (Please include original email in any response)

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30063
Author: Curt Welch
Date: Mon, 27 Jul 1998 00:00
32 lines
2153 bytes
dillon@best.net (Matt Dillon) wrote:
> :In article <6pga50$olf$1@unlnews.unl.edu>,
> :Greg Berigan  <gberigan@cse.unl.edu> wrote:

> :>Guess again.  1000 byte line buffers, including CRLF and
> :>string-terminating NUL.

>     ??Where?  Not in any of the major news transit systems that
>     I know of there isn't.

nnrpd in inn 2.0 has this limitation.  Granted, this isn't the "transit"
portion of inn, but it's yet another piece of major software that needs to
be fixed before the newsreaders can start trying to use a binary standard.

> :>And if the binary also has "CRLF.." sequences in it, what then?  Would
> :>it get pass into the system without change but be translated back
> :>inappropriately as "LF."?
>
>     Think:  CRLF turns into CR{CRLF} which then gets turned back into
>     CR{LF}.  It works just fine.

>     I know this works because I've tested it.  Hell, I *WROTE* Diablo.
>     I ought to know, eh ?

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

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

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30064
Author: Matt Dillon
Date: Mon, 27 Jul 1998 00:00
76 lines
3827 bytes
:In article <19980727203523.032$aP@newsreader.com>,
:Curt Welch <curt@kcwc.com> wrote:
:>dillon@best.net (Matt Dillon) wrote:
:..
:>
:>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.

    Uh, no.   The NNTP protocol requires each 'line' to be terminated with
    the sequence CR+LF.  There is no limit on the line length.  All this
    means is that whenever you see an LF in the article body you simply
    replace it with a CR LF, and whenever the receiver sees a CR LF in the
    article body it simply replaces it with an LF because it is guarenteed
    due to the original escaping requirement that the preceeding CR was 
    added by the code.  Other CR's in the body are passed through untouched,
    so the result is a wash.

    If the original article contains a CR LF combination, the escaped article
    will contain CR CR LF and the receiver will unescape it back into CR LF.

    Diablo, INN, etc etc etc all store article bodies *EXACTLY* as received.
    The NNTP protocol can be thought of as escaping any LF's embedded in
    binary data into CR LF's, and then de-escaping them back to LF's on the
    receiving end.

:>
:>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

    If the original article as written in someone's text editor is this:

	X CR LF LF CR CR CR LF Y LF CR LF Z CR CR LF 

    Then the article escaped with the NNTP protocol is this:

	X CR CR LF CR LF CR CR CR CR LF Y CR LF CR CR LF Z CR CR CR LF 

    And when unescaped by diablo or INN or whatever, the article is stored
    in the spool in it's original form.  Unescape the above info and you
    get:

	X CR LF LF CR CR CR LF Y LF CR LF Z CR CR LF 	(same as figure 1)

    Diablo, INN, etc.... store the article bodies on disk *EXACTLY* as it was
    originally posted prior to the original NNTP escaping.  From the
    point of view of the transit software, the article bodies are binary
    data.

						-Matt

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


-- 
    Matthew Dillon  Engineering, HiWay Technologies, Inc. & BEST Internet
                    Communications
    <dillon@best.net> (Please include original email in any response)

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30075
Author: Jeff Holloway
Date: Mon, 27 Jul 1998 00:00
32 lines
2431 bytes
In news.software.nntp Matt Dillon <dillon@best.net> wrote:
> :In article <19980727114121.703$9g@newsreader.com>,
> :Curt Welch <curt@kcwc.com> wrote:
> :>dillon@best.net (Matt Dillon) wrote:
> :..
> :>>     I know this works because I've tested it.  Hell, I *WROTE* Diablo.
> :>>     I ought to know, eh ?
> :>
> :>There are other OSs in the world besides Unix.  Not all servers will
> :>translate CR LF into LF.
> :>
> :>-- 
> :>Curt Welch                                            http://CurtWelch.Com/
> :>curt@kcwc.com                          Webmaster for http://NewsReader.Com/

>     ?? 'other OS's'?  The OS has nothing to do with it.  CRLF translations are
>     not something the OS does in the case, they are something the news
>     transit software does.  Let me put it this way:  The backbones have been
>     moving to 8-bit clean for several years now.  Any systems that can't 
>     handle it are going to be (and many have already been) S.O.L.  Whether
>     you like it or not.  

Don't waste your breath. He just sounds like another Microsloth apologist.

-- 
Jeff Holloway        | He had that rare weird electricity about him --
System Administrator | that extremely wild and heavy presence that you
Tech 7 Systems, Inc. | only see in a person who has abandoned all hope
jeffh@tech7.com      | of ever behaving "normally" - Hunter S. Thompson,
		     | "Fear and Loathing '72"

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30081
Author: Charlie Fluffy
Date: Tue, 28 Jul 1998 00:00
50 lines
3504 bytes
On 26 Jul 1998, Matt Dillon wrote:

>     What you are arguing here is basically "Since some of the code out
>     there is broken we therefore should not ever in the future of the
>     USENET implement new standards to fix the problems" (my quote).  That's 
>     a bullshit argument that doesn't fly.

Um, correct me if I'm wrong, but I thought the point of standards was to
ensure interoperability between implementations, while also retaining
backwards compatibility where necessary, or something like that...

In other words, the legacy behaviour of INN, while it is not entirely
binary-transparent, conforms to that of the existing specification, which
specifically excludes the NULL and CR.  You can't just revoke this
permission, but instead you have to extend the specification to permit
that which is presently not allowed or not guaranteed to work.

Just like SMTP mail is required to not contain any 8th-bit-set octets,
thus in order to make it possible to send 8-bit data efficiently, ESMTP
had to be introduced.  Or is there a difference in that SMTP made it to
the status of an actual STD document, while the same is not true for NNTP
as a transfer protocol, and thus it's fair game for revision as a not-
standard in ways that break existing implementations?

I'm not sure if the idea of binary-transparent news transfer reminds me
more of the differences in the POP vs IMAP debate, or the enhancement of
SMTP with ESMTP and 8BITMIME...  In any case, if it's to be like the
former, by introducing capabilities that are not compatible with the
existing software and specification, I suggest that perhaps attention be
turned to using a different port, say, port 443, for the new news transfer
protocol which can be 8-bit- and binary-transparent from the ground up. 
If not, then perhaps it will be necessary to define an ENNTP or some such
abomination wherein the capabilities of the recipient can be negotiated at
the start of the transaction, to indicate whether transfer of binary data
will in fact be successful or whether such data will need to be somehow
escaped or encapsulated via a different content-transfer-encoding. 

Unlike SMTP, which is rather often a simple point-to-point protocol, where
an old IDA 5.65 sendmail will only affect recipients on that machine, the
distribution nature of news transfer is such that a single machine which
cannot properly handle an `invalid' article can easily result in
corruption of that article on a significant number, even a majority, of
other systems out there.


Barry Bouwsma
not acting in a support department in any way


Re: REPOST: Re: Content-Transfer-Encoding: binary
#30083
Author: bill davidsen
Date: Tue, 28 Jul 1998 00:00
31 lines
2389 bytes
In article <6pjaar$9te$1@flea.best.net>, Matt Dillon <dillon@best.net> wrote:

|     Uh, no.   The NNTP protocol requires each 'line' to be terminated with
|     the sequence CR+LF.  There is no limit on the line length.  All this
|     means is that whenever you see an LF in the article body you simply
|     replace it with a CR LF, and whenever the receiver sees a CR LF in the
|     article body it simply replaces it with an LF because it is guarenteed
|     due to the original escaping requirement that the preceeding CR was 
|     added by the code.  Other CR's in the body are passed through untouched,
|     so the result is a wash.
| 
|     If the original article contains a CR LF combination, the escaped article
|     will contain CR CR LF and the receiver will unescape it back into CR LF.

And if it has a LF? If I have a sequence:
    'a' 'b' 'c' LF 'd' CR LF 'b' 'a' 'r' CR LF
that should be two lines, no? It's not enough to convert CRLF to LF and
back to CRLF, because embedded LF characters get changed to CRLF on the
way out.

Did I restate his question more clearly? If you are going to change CRLF
to LF, than you have to escape a naken LF (I assume with a CR).

-- 
Bill Davidsen (davidsen@tmr.com) CTO, TMR Associates, Inc
  What do you mean I shouldn't do things like that at my age? At my
age if you don't do things like that you might die of natural
causes or boredom!


Re: REPOST: Re: Content-Transfer-Encoding: binary
#30084
Author: Matt Dillon
Date: Tue, 28 Jul 1998 00:00
49 lines
3482 bytes
:In article <Pine.BSF.3.96.980728202925.13581E-100000@coredump.int.tele.dk>,
:Charlie Fluffy  <ag786@yfn.ysu.edu> wrote:
:>>     a bullshit argument that doesn't fly.
:>
:>Um, correct me if I'm wrong, but I thought the point of standards was to
:>ensure interoperability between implementations, while also retaining
:>backwards compatibility where necessary, or something like that...
:>
:>In other words, the legacy behaviour of INN, while it is not entirely
:>binary-transparent, conforms to that of the existing specification, which
:>specifically excludes the NULL and CR.  You can't just revoke this
:>permission, but instead you have to extend the specification to permit
:>that which is presently not allowed or not guaranteed to work.
:>
:>Just like SMTP mail is required to not contain any 8th-bit-set octets,
:>thus in order to make it possible to send 8-bit data efficiently, ESMTP
:>had to be introduced.  Or is there a difference in that SMTP made it to
:>the status of an actual STD document, while the same is not true for NNTP
:>as a transfer protocol, and thus it's fair game for revision as a not-
:>standard in ways that break existing implementations?

    I think it is fair game, at least in regards to NNTP.  The standards aren't
    actually being broken.  The 7 bit crap, for example, is 20 years out of 
    date and became even less relevant when the international character sets
    started to come into use.  Nobody in their right mind strips the 8th bit 
    in article bodies any more.  SMTP faced a very different problem then
    NNTP did, though, because SMTP uses 8th bit escapes (i.e. special 
    characters OR'd with 0x80) in certain situations while NNTP does not.
    News systems can also be piecemeal updated without breaking the USENET
    as a whole due to its mesh.

    But the key reason you can do it is because you aren't actually breaking
    anything that hasn't already been broken by the massive usenet abuse that
    has already occured.  The embedded NUL problem, for example, has stuck and
    continues to stick feeds to systems running out of date software.  It got
    so bad that I had to add options to detect embedded NUL's so a small 
    percentage of sites could decline to pass such articles on to certain
    broken destinations.   Having to handle arbitrary data is now a requirement
    unless you want to see your software break when someone posts something
    odd.

							-Matt

-- 
    Matthew Dillon  Engineering, HiWay Technologies, Inc. & BEST Internet
                    Communications
    <dillon@best.net> (Please include original email in any response)

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30086
Author: Curt Welch
Date: Tue, 28 Jul 1998 00:00
84 lines
5697 bytes
dillon@best.net (Matt Dillon) wrote:
>     Curt, you are severely misinterpreting the RFC's

Well, I think it comes down to this.  What we are talking about (i.e. how
to send raw binary data over an NNTP connections), isn't defined in any
RFC.  As a matter of fact, all the current RFCs say don't do it.  On top of
that, no client is currently trying to do it (no common practice to turn
to).

So, with that said, there's no way for us to talk about what might be the
"right" way to do it.  Or at least there's no document you or I could point
to to "prove" one way was right or wrong.  My inital point in this thread
wasn't that one way was right or wrong, just that there were multiple ways
this might be done.  Your point (as I understand it), is that only the way
that will work with inn and Diablo is the "right" way. I guess that's an OK
point of view.

But if this is the case, then the new draft usefor document is going to get
us in trouble - because we should be defining Usenet article lines as
ending in LF, not CRLF. (This logic is a bit hard to follow so let me
explain).  If I create a USENET article in the new CRLF format and also
include a mime section with raw binary data, I'm going to have a very
complex job to do when I try to send this to an NNTP server.  The problem
is that for the CRLFs that are used as EOL markers, I don't want to change
the LFs to CRLFs (that would cause an extra CR to show up at the end of
each line).  But for any stray LFs in the binary data, I will need to
translate the LFs to CRLFs.  See what I'm getting at?.  And on the
receiving end, if I want to convert the NNTP stream back into a USEFOR
standard format, then I can't just change all CRLF's to LFs.  I have to
parse all the mime headers and only do that translation while in the middle
of a binary section.  If I do it for all CRLF pairs I don't end up with a
USEFOR starndard Usenet article.  I end up with one that's in the Unix
format with LF's at the end of the lines (which could be converted to the
CRLF format but that's once again the same complex problem that requires
parsing all the mime headers).

>     I will repeat that:  NNTP is an ESCAPING protocol, not a TRANSLATION
>     protocl.  The major news transit systems use it as an escaping
>     protocol, INCLUDING CYCLONE.

No it doesn't.  At least not from what I've been told.  It stores data in
CRLF format and doesn't translate it into LF format.  I think you are still
missing some of what I'm saying.  I said it was different from Diablo and
since you are assuming Diablo is doing the right thing, that must mean that
Cyclone is doing the wrong thing.  But that's not what I said.  I said
Cyclone gets it right for both cases.  Diablo only get it right for
once case (i.e. the way "you" think it should work).

>     I will repeat that so it is crystal
>     clear: cyclone does the right thing with embedded CR's.

Embedded CR's were never the issue.  It's embedded LFs that cause a
problem with the way Diablo and old inn work.  Cyclone (from what
I've been told) deals correctly with both embedded CRs and embedded LFs.
I've never said it didn't. Diablo and inn on the other hand screw up
embedded LFs - thereby forcing us to escape embedded LFs with a preceding
CR (and as a complex side effect - means we (clients) will end up
processing articles in Unix LF format no matter what USEFOR says).  Cyclone
gets it right no matter which way the world decides to send binary data
over NNTP.

You can ignore the issues of how the transit software stores the articles
and how the clients interprete the NNTP stream and still see the issue
here.  Look instead at the raw data that's sent over an NNTP connection.
Cyclone can receive and retransmit articles with embeded CRs or embedded
LFs in this stream without changing the data.  What it passes on to the
next server is exactly what it received.  But Diablo and inn (at least in
the old storage format) can not correctly reproduce what it received if the
data has embedded LFs.  To me, that's not 8 bit clean.  But if you think it
is, then there really is no counter argument to that position.

But, if Diablo were to store articles in the USEFOR/NNTP CRLF format, and
not do the CRLF -> LF "escaping" in the storage process, then Diablo could
be as 8-bit clean as Cyclone is.

There's no way to say what's right or wrong, but I sure think the way
Cyclone works is better.  It gives us (Usenet) more options to work with
in the future and a true 8 bit clean channel.

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

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30099
Author: Curt Welch
Date: Tue, 28 Jul 1998 00:00
88 lines
5687 bytes
dillon@best.net (Matt Dillon) wrote:
>     If the original article as written in someone's text editor is this:
>
>         X CR LF LF CR CR CR LF Y LF CR LF Z CR CR LF
>
>     Then the article escaped with the NNTP protocol is this:
>
>         X CR CR LF CR LF CR CR CR CR LF Y CR LF CR CR LF Z CR CR CR LF

Matt, I think you have spent too much time writing transports and not
enough time writing clients.

That type of escaping is NOT part of the NNTP protocol. It's something
that's done on _UNIX_ systems to convert the Unix format text files to NNTP
format text files.

If I create a text file on a PC (which I try not to do :)), then the lines
already end in CR LF.  So when I send the file to an NNTP server with a
POST command, I don't map the LF's to CR LFs.  If that file has an imbeded
raw JPEG file, then I also don't expect to do any type of translating of
characters. I'd just expect to send it in it's raw format.  But if I do
that, then Diablo will corrupt the file by adding a CR in front of any LF
that didn't already have one.

If the text file was created on a Mac, then the lines would end with a
single CR.  So the code that reads this format file and sends it with an
NNTP POST command will translate CR to CR LF.  What should it do with the
JPEG segment?

This is exactly the same problem as ftp file transfers in text versus
binary mode.  The problem is that NNTP clients and servers treat the NNTP
format as a TEXT format transfer, and they convert articles to and from
their local text formats.  For Unix this means mapping LF to CRLF when
sending.  For PCs and other DEC like sytems (like VMS) this means no
mapping required (execpt sometimes adding the ^Z EOF marker).  For Macs,
this means translating CR to CRLF.

There WILL BE problems if all the transports and clients try to send raw
binary data and still do their own "local" text conversions (like they do
today).  It's the same problem that happens if you ftp a binary file from a
Unix system to a PC in text mode.

You can move a binary file over FTP in text mode if the sending and
receiving systems are doing the same type of translation (i.e UNIX to UNIX,
or PC to PC etc).  But if you send it from Unix to PC in text mode, it
won't work.  I know you understand this.

What you seem to be saying is that everyone should be doing Unix text file
conversion and if they aren't then too bad for them.  That can work, but it
means all systems must do a UNIX like CR LF to LF translation when storing
the article in order to correctly extract the raw binary data.  And then
read lines in the UNIX style with an LF marking the end of the line.  And
it means that on a system that uses other styles of end-of-line markers you
can't convert the article to "local" end-of-line format without a complex
translation that requres you to read and parse mime headers so you know
which section of the file is "text" (and needs the conversion) and which
section is "raw binary" and doesn't need the conversion.

So, I repeat.  How to send binary data on an NNTP connection isn't obvious.
And for starters, I think all NNTP transports should send articles exactly
like they recieve them (i.e true 8 bit clean).  And if you translate your
articles into Unix text format and back again, then you won't be able to
receive and retransmit LF CR LF without changing it to CR LF CR LF, and I
think that's a bug.  And if there were a Mac transport that received CR CR
LF and translated that into CR LF CR LF when it was sent to the next
server, that too would be a bug in my mind.

I notice that CNFS seem to store the CR LF - so maybe INN 2.0 with the new
storage format gets this right.  And I suspect that the Highwind products
store the data in NNTP format so they too don't have the translation
problem.  But once the transports are all "fixed", we still need to decide
on how to send binary data over this "Text" protocol.  Is the binary left
unchaged (which strikes me as the natural way to do it), or does it go
though a Unix like LF to CR LF translation that you seem to think is the
obvious and only "right" way to do it?

Making Usenet transports 8 bit clean is a good thing.  I have my doubts
about whether we really want to send binaries in raw form, but there are
various other good reasons to make the transports 8 bit clean.  But I think
it's not as simple and obvious as you think.  And if Diablo is still
translating articles to local Unix format, I'd say Diablo isn't yet
(completely) 8 bit clean.

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

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30105
Author: Charlie Fluffy
Date: Tue, 28 Jul 1998 00:00
31 lines
2192 bytes
On 27 Jul 1998, Matt Dillon wrote:

>     [...]  8-bit-clean works across most of
>     the USENET backbone now.

Um...  I'm not sure that I agree (replacing the phrase 8-bit-
clean, which to me implies not stripping high-bit-set octets
to seven bits, with binary-clean).  Looking at the recent
Freenix numbers, It's clear that well over 10% of the articles
on a random spool have traversed some INN 1.x family swerver,
which is known to strip binary images after the first few
octets.  I suspect the actual number is much higher, at least
1/3, and quite possibly well over 50%.  And of course, there
are a lot of places out there where 100% of the articles they
see pass through one or a chain of INN boxes.

I still regularly see occasional articles where the high-bits
have been stripped (which affects accented characters and
most non-European languages) to this day, and it was only a
few years ago that the B News machine which provided all the
news to one country using a language requiring 8th-bit-set
characters was finally put out of service.


Barry Bouwsma
organization provided for identification purposes only and
should not imply that I am authorized to speak in any official
or unofficial capacity as any sort of representative


Re: REPOST: Re: Content-Transfer-Encoding: binary
#30106
Author: Matt Dillon
Date: Tue, 28 Jul 1998 00:00
142 lines
8223 bytes
:In article <19980728133745.073$Lq@newsreader.com>,
:Curt Welch <curt@kcwc.com> wrote:
:>dillon@best.net (Matt Dillon) wrote:
:>
:>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?).

    Curt, you are severely misinterpreting the RFC's.    The modern 
    interpretation of the RFC's is that NNTP is an escaping protocol,
    *NOT* a translation protocol.

    If you read the RFCs with that idea in mind, they will become much
    clearer to you.  NNTP is an escaping protocol.  "." escaping and LF 
    escaping... same difference.  You are applying one definition to "."
    escaping and applying a totally different definition to LF escaping
    when, in fact, both escaping mechanisms work in the same manner.

    I will repeat that:  NNTP is an ESCAPING protocol, not a TRANSLATION
    protocl.  The major news transit systems use it as an escaping protocol,
    INCLUDING CYCLONE.  I will repeat that so it is crystal clear:
    cyclone does the right thing with embedded CR's.

:>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.

    This is incorrect.  Much of the older software, such as uucp, used
    a (data,extent) which meant that the data content during the transfer
    did not have to be escaped, which meant that it was effectively sent
    in its binary form which, for a text-body, tends to be LF-only since
    that is the defacto plain ascii data encoding used on the USENET.  But
    it doesn't have to be.

    With the NNTP protocol, the data content must be escaped to conform
    to the NNTP protocol.  In a modern interpretation of the protocol, this
    does NOT cause the data to be munged, it simply causes it to be escaped
    on one end and unescaped on the other, resulting in the original.

    Nobody writing or updating news software today disagrees with the
    'NNTP is an escaping protocol' interpretation of the RFC's.

:>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.

    The modern interpretation of the RFCs is that they are talking about
    escaping data, not translating it.

:>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.

   You are seriously misinterpreting the document.  In the NNTP protocol,
   like with many internet protocols, the command and/or line delimeter 
   must be CRLF.  The modern interpretation of the document is that this
   is a required ESCAPING, similar to "." escaping, not an optional
   escaping.

:>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.

    The RFC has this comment wrong.   Well, not quite wrong... in fact,
    the RFC is correct in regards to the *last* character of the body, which
    must be an LF in raw form so the NNTP-escaped version can be
    CR+LF+"."+CR+LF.  (otherwise the '.' wouldn't be recognized as an
    article terminator).  At the time it was written, the RFC was more 
    correct with this comment then it is now, but anyone going by the
    old interpretation of the RFC is going to (properly) get harassed until
    they fix it.

    Some news systems capitalize the host-part of the Message-ID: too, and
    the RFC doesn't strictly disallow it, but a large percentage of the
    backbone will no longer accept message-id munging (where the message-id
    in the IHAVE/TAKETHIS command has a different capitalization then the
    one in the Message-ID: header of the article).  It is considered broken
    to mess with the message-id in that fashion, just as it is considered
    broken to not properly escape/descape articles passed via the NNTP
    protocol.

:>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

    All major newstransit systems do this.  Those that don't are rapidly
    being fixed or replaced and are properly considered broken in the modern
    interpretation of the RFCs.  As I said, this has been a significant trend
    for the last several years.  You can argue that the NNTP protocol
    doesn't specifically forbid improper escaping but nobody familiar with
    USENET news transport would actually *implement* it that way these
    days.

:>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.

    It's a matter of interpretation.  The modern interpretation of the NNTP
    protocol is that it is an escaping protocol, not a translation protocol.
    If you read the the RFC's with that in mind they will become much more
    clear to you.  You are stuck on this nntp-as-translation-protocol bent
    and it just isn't the way NNTP is used or defined these days.

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


-- 
    Matthew Dillon  Engineering, HiWay Technologies, Inc. & BEST Internet
                    Communications
    <dillon@best.net> (Please include original email in any response)

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30115
Author: Charlie Fluffy
Date: Tue, 28 Jul 1998 00:00
45 lines
3019 bytes
On 26 Jul 1998, Francois Ranchin wrote:

> [...] There is no good reason
> to force the replication of a fucking .mp3 file of 8mo through
> 200.000 usenet site. If you want a CD-ROM : go to the mall or the virtual
> mall. If you want porn : go to the sex-shop. Why ALWAYS usenet ?

Sure there's a good reason.
http://www.news.inet.tele.dk/switch11.inet.tele.dk.3.html

The bandwidth you see in green is that sucked out of our news swerver by
our customers.  The line in blue is the bandwidth used for the incoming
feed.  Almost never is the amount our customers take exceeded by the
overall bandwidth of the news feed.


> Why not to send only the URL with where to find the song instead of the song 
> itself ?

We have almost no customers who bother with the music at the moment,
almost all of them are getting their rocks off on the latest reposts of
the same old blurry scans.  Nevertheless, even without too much fine-
tuning, Usenet works remarkably well as a cache for the most popular pr0n
groups, given adquate readership with the appropriate perversions.

We certainly wouldn't want to redirect this local, inexpensive bandwidth
out over our trans-Atlantic link.  Furthermore, the local connection
almost always outperforms our links to elsewhere in terms of available
capacity and quality, with latency in milliseconds and negligible packet
losses, which is much more than I can say for the paths to the Real World.

And when one of our lusers posts a boatload of scans of his wife doing a
donkey, it can be accessed by the millions of readers around the world
yet it only needs to travel once, twice, or maybe three times from our
swerver to the outside world, rather than resulting in hundreds of
simultaneous sessions transferring the same data outbound.


Barry Bouwsma
by choosing to participate in these public fora, I am acting on my own
without the authority or support of my employer, and accept all
consequences resulting from my independent actions


Re: REPOST: Re: Content-Transfer-Encoding: binary
#30116
Author: Curt Welch
Date: Tue, 28 Jul 1998 00:00
181 lines
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/

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30123
Author: 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/

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30129
Author: Clayton O'Neill
Date: Wed, 29 Jul 1998 00:00
31 lines
2300 bytes
On 28 Jul 1998 22:43:43 GMT, Curt Welch <curt@kcwc.com> wrote:
|dillon@best.net (Matt Dillon) wrote:
|>     Curt, you are severely misinterpreting the RFC's
|
|Well, I think it comes down to this.  What we are talking about (i.e. how
|to send raw binary data over an NNTP connections), isn't defined in any
|RFC.  As a matter of fact, all the current RFCs say don't do it.  On top of
|that, no client is currently trying to do it (no common practice to turn
|to).

IMHO, both of you are wrong.  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 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.  I'd bet that NNTPRelay
also does this.  As far as I can tell, rfc1036 is completely irrelevent,
since the only place where it addresses the body of the message is with the
optional Lines header.  I personally believe it should be replaced with
Content-Length.

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.


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

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30141
Author: Curt Welch
Date: Wed, 29 Jul 1998 00:00
15 lines
1572 bytes
usenet@oneill.net (Clayton O'Neill) wrote:
> INN 2.0 and up is 8bit clean.  I made quite sure of that when I was
> working on it.  It does store articles in wireformat.

Thanks for clearing that up.

I assume this is only true when using the new storage API?  If you
select the traditional format it still stores it the "old" way
in UNIX LF format doesn't it?

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

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30144
Author: Edward S. Marshall
Date: Wed, 29 Jul 1998 00:00
39 lines
3069 bytes
In article <Pine.BSF.3.96.980728194136.13581D-100000@coredump.int.tele.dk>,
	Charlie Fluffy <fluffy@int.tele.dk> writes:
> The bandwidth you see in green is that sucked out of our news swerver by
> our customers.  The line in blue is the bandwidth used for the incoming
> feed.  Almost never is the amount our customers take exceeded by the
> overall bandwidth of the news feed.

In your case, this is definitely a win; pulling data over a trans-atlantic
link isn't fun. However, I'd also assume you're running a caching proxy
as well, to reduce web traffic?

Usenet is a discussion forum; HTTP and FTP are much better suited to file
transfers. By caching the data your customers pull down via HTTP, you'll
realize the same win you're getting now, without all the rest of us needing
to suffer under the load of binary transfers on what was originally designed
as a message-passing system.

The beauty of using HTTP/FTP for file transfers is that the cost of content
delivery falls on the customer (presumably), while with Usenet, you'd go
quickly out of business charging customers by the byte (at least in North
America). With HTTP, by-the-byte charges are common, and to be expected.
And, with a robust proxy scheme, you can achieve just as great a saving in
overall bandwidth usage.

And to be honest, I wouldn't -want- to get in the business of charging for
Usenet bandwidth to my end reader customers. I'd just rather they didn't
excessively post, or post binaries. By the same notion, I'd rather not
receive either.

Too bad it would be just as damaging to our business to stop offering
*.binaries.* ... at least I can get away with filtering spam.

-- 
.-----------------------------------------------------------------------------.
| Edward S. Marshall <emarshal@xnet.com> | Systems/Network Administrator,     |
| http://www.xnet.com/~emarshal/         | XNet Information Systems, Inc.     |
`-----------------------------------------------------------------------------'

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30147
Author: 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

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30152
Author: Clayton O'Neill
Date: Wed, 29 Jul 1998 00:00
18 lines
1731 bytes
On 28 Jul 1998 17:37:45 GMT, Curt Welch <curt@kcwc.com> wrote:
|dillon@best.net (Matt Dillon) wrote:
|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?).

INN 2.0 and up is 8bit clean.  I made quite sure of that when I was working
on it.  It does store articles in wireformat.

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

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30154
Author: Clayton O'Neill
Date: Wed, 29 Jul 1998 00:00
20 lines
1711 bytes
On 29 Jul 1998 02:04:43 GMT, Curt Welch <curt@kcwc.com> wrote:
|usenet@oneill.net (Clayton O'Neill) wrote:
|> INN 2.0 and up is 8bit clean.  I made quite sure of that when I was
|> working on it.  It does store articles in wireformat.
|
|Thanks for clearing that up.
|
|I assume this is only true when using the new storage API?  If you
|select the traditional format it still stores it the "old" way
|in UNIX LF format doesn't it?

You have the option of storing articles in wireformat if you're using the
traditional spool.  Storage methods are required to present articles in
wireformat to the calling program but can store it anyway they like.


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

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30156
Author: Curt Welch
Date: Wed, 29 Jul 1998 00:00
57 lines
3808 bytes
usenet@oneill.net (Clayton O'Neill) wrote:
> IMHO, both of you are wrong.

Welcome to the discussion :).

> 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.

> 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.

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.

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).

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).

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

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30244
Author: Kai Henningsen
Date: Sat, 01 Aug 1998 00:00
22 lines
1727 bytes
dillon@best.net (Matt Dillon)  wrote on 27.07.98 in <6pjaar$9te$1@flea.best.net>:

>     Diablo, INN, etc etc etc all store article bodies *EXACTLY* as received.
>     The NNTP protocol can be thought of as escaping any LF's embedded in
>     binary data into CR LF's, and then de-escaping them back to LF's on the
>     receiving end.

And this is a news server author? God help the net. It's going to need it.

Try the same argument with mail. Then see that there is *no* difference  
between NNTP and SMTP in this regard.

How on earth can someone who wrote a news server not understand stuff  
that's *this* basic?

Kai
-- 
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30257
Author: Matt Dillon
Date: Mon, 03 Aug 1998 00:00
32 lines
2084 bytes
:In article <6z2psjfmw-B@khms.westfalen.de>,
:Kai Henningsen <kaih=6z2psjfmw-B@khms.westfalen.de> wrote:
:>dillon@best.net (Matt Dillon)  wrote on 27.07.98 in <6pjaar$9te$1@flea.best.net>:
:>
:>>     Diablo, INN, etc etc etc all store article bodies *EXACTLY* as received.
:>>     The NNTP protocol can be thought of as escaping any LF's embedded in
:>>     binary data into CR LF's, and then de-escaping them back to LF's on the
:>>     receiving end.
:>
:>And this is a news server author? God help the net. It's going to need it.
:>
:>Try the same argument with mail. Then see that there is *no* difference  
:>between NNTP and SMTP in this regard.
:>
:>How on earth can someone who wrote a news server not understand stuff  
:>that's *this* basic?
:>
:>Kai

    Try writing news software and see how far you get.  If you haven't
    written it, you probably don't understand it as well as someone who
    HAS written it.  If you don't understand it, you have no business 
    complaining about it.  Any bozo who tries to compare news to mail 
    doesn't understand news.  At all.

					-Matt
-- 
    Matthew Dillon  Engineering, HiWay Technologies, Inc. & BEST Internet
                    Communications
    <dillon@best.net> (Please include original email in any response)

Re: REPOST: Re: Content-Transfer-Encoding: binary
#30264
Author: Forrest J. Cavalier III
Date: Mon, 03 Aug 1998 00:00
113 lines
5608 bytes
In article <slrn6rtb90.qn.usenet@hmmm.colo.erols.net>, usenet@oneill.net wrote...
>
>On 28 Jul 1998 22:43:43 GMT, Curt Welch <curt@kcwc.com> wrote:
>|dillon@best.net (Matt Dillon) wrote:
>|>     Curt, you are severely misinterpreting the RFC's
>|
>|Well, I think it comes down to this.  What we are talking about (i.e. how
>|to send raw binary data over an NNTP connections), isn't defined in any
>|RFC.  As a matter of fact, all the current RFCs say don't do it.  On top of
>|that, no client is currently trying to do it (no common practice to turn
>|to).
>
>IMHO, both of you are wrong.  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 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.  I'd bet that NNTPRelay
>also does this.  As far as I can tell, rfc1036 is completely irrelevent,
>since the only place where it addresses the body of the message is with the
>optional Lines header.  I personally believe it should be replaced with
>Content-Length.
>
>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.

Clayton, perhaps you don't remember something correctly.

Removing CR's is exactly the action of the code in nc.c::NCclean().  In
INN 2.0 there is an innconf->wireformat test added around the call to
NCclean() in nc.c::NCproc().

Actually, what the software does internally is irrelevant.  Software
can store articles in EBCDIC as long as the sequence of bytes on output
matches the sequence of bytes on input.  I don't see things the
way Matt does, but his explanation of "LF escaping" seems accurate to me.

Anyway, here is my story (I looked at the code) of what INN does
with Matt's example, in case anyone still cares......

Using Matt's example:
    If the original data is: (I)

        'a' 'b' 'c' LF 'd' CR LF 'b' 'a' 'r' CR LF

("original" meaning "what the newsreader thinks.")  This must go
out to INN as what Matt calls the "escaped" version, because that
is what the NNTP spec says, and for the example I detail below.

    The escaped version is: (II)

        'a' 'b' 'c' CR LF 'd' CR CR LF 'b' 'a' 'r' CR CR LF

This will be what INN gets from a read() of the socket.
(INN doesn't care what the posting news client thought the
"original" actually was.  All it knows is what it got from read().)

In INN 1.x, (and INN 2.0 with wireformat FALSE), NCclean() is called
on this buffer.  NCclean() finds CR LF sequences and replaces them with
LF.  (Note that it does not just blindly strip CR's which would cause
the problem Curt was pointing out.)

The result is stored to disk as this: (III)
        'a' 'b' 'c' LF 'd' CR LF 'b' 'a' 'r' CR LF

This happens to match Matt's original, but that is irrelevant in
modern servers, which don't have local readers.  If you have local
readers it is very relevant.

When innxmit (or innfeed) sends this file, an LF is always preceeded
by a CR.  (See the code to do exactly this, yourself.)  So it does go
out exactly as it came in: (II)
        'a' 'b' 'c' CR LF 'd' CR CR LF 'b' 'a' 'r' CR CR LF

-----------------------------------------------------------
Next question:
-----------------------------------------------------------
Is INN 8 bit article body compliant using NNTP.  yes and no.

You see, if you give INN the "CR escaped" version (II), it will
spit back the CR-escaped version.  But, as Curt points out,
if you give it the "original" version there is data loss: 

The original (I), 

        'a' 'b' 'c' LF 'd' CR LF 'b' 'a' 'r' CR LF

if returned from a socket read(), stores to disk as: (IV)

        'a' 'b' 'c' LF 'd' LF 'b' 'a' 'r' LF

And is sent back out as: (V)

        'a' 'b' 'c' CR LF 'd' CR LF 'b' 'a' 'r' CR LF


which is not the original at all, for exactly the reasons
Curt points out, and Matt points out.  

INN and diablo should not be concerned about what is the "original"
They should send out what they get in.  When an article is given to
traditional INN without at least one CR preceeding each LF, it will not
do the "right thing."

Forrest J. Cavalier III, Mib Software, INN customization and consulting 
'Pay-as-you-go' commercial support for INN: Only $64/hour! 
Searchable hypertext INN docs, FAQ, RFCs, etc: 650+ pages: Free access! 
   http://www.mibsoftware.com/innsup.htm 


Re: REPOST: Re: Content-Transfer-Encoding: binary
#30277
Author: Greg Andrews
Date: Tue, 04 Aug 1998 00:00
22 lines
1478 bytes
dillon@best.net (Matt Dillon) writes:
>
>    Try writing news software and see how far you get.  If you haven't
>    written it, you probably don't understand it as well as someone who
>    HAS written it.  If you don't understand it, you have no business 
>    complaining about it.  Any bozo who tries to compare news to mail 
>    doesn't understand news.  At all.
>

And the DEEPEST PITS OF HELL are reserved for those who've written
software that handles news *as if it were* mail.

(returning bounce notices to the address on the From: line is the
most obvious and egregious botches such software produces - there
are others)

Offenders:  BBS software, Early versions of CC:mail and Lotus Notes,
	    etc., ad nauseum.

  -Greg

Re: Content-Transfer-Encoding: binary
#43827
Author: Ian Stirling
Date: Tue, 01 Feb 2000 00:00
20 lines
2166 bytes
Brian Edmonds <bedmonds@cs.ubc.ca> wrote:
: Clayton O'Neill <usenet@oneill.net> writes:
:>> Raw binary would only reduce the size by 25%.
:> If I were downloading mb's of binaries at 28.8 or 33.6 I think I'd
:> switch.

: But most of these modems already do compression.  In my experience this
: means you get only marginally better throughput of raw data over uu or
: base64 encoded.  It's not really noticeable.

My limited experience would tend to contradict you, I did some tests
ages ago, and mime/uuencode come down very little faster than binary.

-- 
See http://www.mauve.demon.co.uk/    |Linux PDA, cheap electronics/PC bits sale.
See_header,_for_UCE_policy___________|_____________________________Ian_Stirling.
My inner child can beat up your inner child.              Alex Greenbank


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