Article View: news.software.nntp
Article #46491Re: Encoding binary data
From: Russ Allbery
Date: Thu, 18 May 2000 00:00
Date: Thu, 18 May 2000 00:00
33 lines
2028 bytes
2028 bytes
Anne Wilson <anne@unidata.ucar.edu> writes: > Andrew Gierth wrote: >> As far as NNTP is concerned, the limits on data are: >> >> - no NUL characters (many implementations choke on them) >> >> - CR+LF should occur only together and only as a line terminator >> (some implementations convert line endings to local format on >> reception, this usually results in bare LFs being converted to >> CR+LF on transmission) > Sorry - I don't follow the "only as a line terminator" part. If CRLF > should occur in my binary file, is that a problem? Yes. You're going to need to do some sort of encoding at least to avoid the sequence CRLF.CRLF in the body of the message (normally dot-stuffing is used), and if you want to use stock INN, you'll need to avoid lone CRs, lone LFs, and any NUL characters. But you could design a fairly low-overhead encoding algorithm that just replaces those particular characters with some sort of string in a reversible way rather than doing the full-blown encoding that base64 does. >> - '.' at the start of a line must be escaped with another '.' > Why is this? Because NNTP commands to transit articles are terminated by CRLF.CRLF. -- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Technical Details
Message-ID:
<yl8zx7m4tm.fsf@windlord.stanford.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<3921BBF8.F251A540@unidata.ucar.edu> <87bt2511sn.fsf@erlenstar.demon.co.uk> <3924568F.463ADE1@unidata.ucar.edu>Show Full Headers
Complete Article Headers
Message-ID: <yl8zx7m4tm.fsf@windlord.stanford.edu> Subject: Re: Encoding binary data Date: Thu, 18 May 2000 00:00:00 +0000 From: Russ Allbery <rra@stanford.edu> References: <3921BBF8.F251A540@unidata.ucar.edu> <87bt2511sn.fsf@erlenstar.demon.co.uk> <3924568F.463ADE1@unidata.ucar.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 625295879 Content-Type: text/plain; charset=us-ascii Organization: The Eyrie Mime-Version: 1.0 User-Agent: Gnus/5.0802 (Gnus v5.8.2) XEmacs/21.1 (Biscayne) Newsgroups: news.software.nntp