Article View: news.software.nntp
Article #62793NNTP and YENC
From: Bart Crane
Date: Sun, 05 Jan 2003 01:33
Date: Sun, 05 Jan 2003 01:33
80 lines
4876 bytes
4876 bytes
Hello, I am having difficulty resolving this issue. I have asked about it here before, and was pointed to the news.software.readers group. I posted there in the hopes of convincing authors of newsposting software to help, and I was pointed back to here. It was also suggested that I email yenc.org, but I had already done so and received no response. It is a ridiculously small thing, a 1-byte change to the encoder-spec, and no change on the decoder. The problem is that NNTP servers are forwarding YENC-encoded data, but this data includes control-characters, one of which, 0x1A, is interpreted within text-streams on DOS/Windows to mean "End Of File." This causes sed and grep to terminate early. You can imagine my consternation. So, I am posting here, so as to ask those who actually run news servers, would you please reject any article that is posted to your server that contains ANSI-defined control-characters (hex 00 to 1F and FF), except those defined by the NNTP spec as allowed (CR, LF, TAB)? Or, if that is too onerous as a first step, could you please do so if the article contains 0x1A??? Or, could you forcibly insert into the subject: header a key phrase so I can grep -v those articles out of the listing? That may sound extreme, but, RFC 977 says that the format of Response Data is "textual". Many people consider this to be a 7- vs. 8-bit issue, but it is not. It is a text- vs. control-character issue. The difference is seen with the C runtime library function fopen(), which takes an argument that can include a flag that indicates "binary" mode: "rb" and "wb". In this mode, the C runtime library does not perform any interpretation of the data. When this flag is absent, the stream is opened in "cooked-mode", which is also the default mode for standard input. In this mode, the C runtime library maps the implementation details of how a particular operating system defines a "text stream" to C logical constructs, such as '\n'. Without this concept, text-processing utilities would need special-case coding to account for how different operating systems implement text-streams. With this concept, one can write newsreader software in portable C and expect it to compile and function properly on any platform. That has been my expectation and experience, until now. This is not an 7- vs. 8-bit issue. No matter the number of bits in a byte, if the value is in the range of 0..31 or is -1, ANSI defines it to be control character. In a text-stream, a "control character" may be interpreted specially. The NNTP authors explicitly allow only two control-characters, CR and LF, and are vague on TAB. For good reason, because other control characters have other meanings on other operating systems, such as 1A == End Of File. The NNTP authors were clearly talking about "stdin", but refrained from naming it as such, so as to keep implementation details (Unix) out of the spec. Instead, they used wording to effect that the NNTP server output was destined "for the user's terminal". I would very much like to return to treating the output from NNTP servers as "textual". That was the original intent, that was the existing practice, and of all of the reasons for using YENC, none preclude continuing that practice. It is a dark day indeed if a network protocol can be introduced and adopted that is so clearly in violation of multiple pre-existing standards, and does so in such a way that breaks pre-existing systems based on those standards. Okay, you got me: it breaks one pre- existing system. But that system is mine!!! You may laugh at the idea of doing big-time data processing on a DOS machine, but the world is not just one big bourne shell. Okay, I am ranting... time to turn it over for comments. Thanks for reading!! Bart.
Technical Details
Message-ID:
<BXLR9.432835$pN3.48082@sccrnsc03>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!wn12feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi_feed3!attbi.com!sccrnsc03.POSTED!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <BXLR9.432835$pN3.48082@sccrnsc03> Subject: NNTP and YENC Date: Sun, 05 Jan 2003 01:33:21 GMT From: "Bart Crane" <svcrane@attbi.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!wn12feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi_feed3!attbi.com!sccrnsc03.POSTED!not-for-mail Newsgroups: news.software.nntp Lines: 79 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 NNTP-Posting-Host: 12.234.193.86 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc03 1041730401 12.234.193.86 (Sun, 05 Jan 2003 01:33:21 GMT) NNTP-Posting-Date: Sun, 05 Jan 2003 01:33:21 GMT Organization: AT&T Broadband