🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #63385

Re: yEnc decoding implementation

#63385
From: Jeremy
Date: Mon, 20 Jan 2003 04:16
72 lines
4589 bytes
Russ Allbery  <rra@stanford.edu> wrote:

>  1. Specify a new Content-Transfer-Encoding named x-yenc-combined.  The
>     specified decoding for that CTE is exactly the same as a yEnc post is
>     currently, including not changing any of the content not enclosed
>     between =ybegin/=yend.
> 
>     This isn't a clean MIME CTE, and isn't suitable for standardization,
>     since there is still structure contained in the message that's being
>     hidden by the CTE.  It approaches a real CTE, though, if you define
>     only those things between =ybegin/=yend as being the real content of
>     the message and specify that a decoder should ignore all other content
>     in the message.  It's close enough for the initial step.

I skipped this step basically for two reasons.  The first was that it
seems unnecessary; extraneous text content is already strongly discouraged
in yEnc posts, so you can just define =y lines as extra, ignored data.

The second reason is more significant.  A yEnc transfer-encoding needs
(or really ought to have) an end-of-data marker, and =yend serves this
purpose fine, as well as preserves backwards compatibility, so leaving
it in makes sense, and at that point the other =y lines can stay as well,
which is what you're doing in step 2 anyway.

So, simply defining CTE: yEnc (and CTE: x-yEnc) right off the bat preserves
backwards compatibility unless extra text is being included, which it
generally isn't, and decoding implementations can ignore it if it is
(and since those won't be speaking CTE: yEnc, they would anyway).  Stuff
that does speak CTE: yEnc wouldn't generate it, but they would need to
include decoding of non-MIME yEnc messages anyway, so "legacy" posts
with extra text would be no big deal.

>     except that I think the file name should stay in Content-Disposition
>     since I don't think having the file name in the same header actually
>     is to much advantage.

The reason I put the filename there is just so a client can grab one header
to get required metadata, thus not even needing to grab the overview.  But,
even if this is done, it should probably be in Content-Disposition too
anyway.

(My grab-one-header idea does require server implementation changes, of
course, to allow (and probably optimize) XHDR Content-Type.  I'm not a
server implementor, but this was easy to add at Supernews.)

> Now, Kjetil's suggestion was to add new parameters to Content-Disposition
> to handle multipart binaries rather than introducing a new content-type.
> I can see some real appeal to this, primarily because adding a new
> content-type results in information loss.  Jeremy's content-type has a way
> of noting the original content-type so that the implementation can have
> that available after decoding, but there isn't anywhere to put any
> parameters that were associated with the original content-type.

It's a "cleaner" solution, certainly.  It defeats my "grab-one-header"
idea, of course, and it does introduce a level of incompatibility with
existing software which will think the post is a complete file of the
indicated type, whereas adding a new type means they would see it as
just an opaque block of data.

I suspect it might be easier in existing software to handle an opaque
chunk of data externally, rather than convincing it not to handle the
(incomplete) file as a complete file.  The approach does have real
advantages, though, so I don't think it's entirely clear at this point
which one would be better.

> It would be good to get the advice of some MIME experts on this point.

Yeah.

-- 
Jeremy  |  jeremy@exit109.com
Technical Details
Message-ID: <1043036218.711994@ok-corral.gunslinger.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!saloon!newsbastard
References: <PM0003B2ED450C7E1E@minion.nashville.comcast.net> <5727b.31320d@archiver.winews.net> <ylof6xyaj0.fsf@windlord.stanford.edu> <ylptqszh2j.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <1043036218.711994@ok-corral.gunslinger.net>
Subject: Re: yEnc decoding implementation
Date: Mon, 20 Jan 2003 04:16:58 +0000
From: Jeremy <jeremy@exit109.com>
References: <PM0003B2ED450C7E1E@minion.nashville.comcast.net> <5727b.31320d@archiver.winews.net> <ylof6xyaj0.fsf@windlord.stanford.edu> <ylptqszh2j.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!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!saloon!newsbastard
Newsgroups: news.software.nntp
Organization: There Is No Organization
Lines: 71
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
X-Meow: Meow