From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: base64 behavior is not MIME compliant Date: Tue, 5 Jul 2005 21:15:04 -0400 Message-ID: References: <87wto4j44m.fsf@kanga.tapsellferrier.co.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1120614105 9494 80.91.229.2 (6 Jul 2005 01:41:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 6 Jul 2005 01:41:45 +0000 (UTC) Cc: Marc Horowitz , rms@gnu.org, bugs@gnus.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 06 03:41:42 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dpyup-0004dV-On for ged-emacs-devel@m.gmane.org; Wed, 06 Jul 2005 03:41:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dpyw7-0001K9-Fr for ged-emacs-devel@m.gmane.org; Tue, 05 Jul 2005 21:42:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dpyln-0005Wc-2z for emacs-devel@gnu.org; Tue, 05 Jul 2005 21:32:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dpyle-0005SP-Hh for emacs-devel@gnu.org; Tue, 05 Jul 2005 21:32:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dpyld-0005FW-88 for emacs-devel@gnu.org; Tue, 05 Jul 2005 21:32:01 -0400 Original-Received: from [207.172.4.63] (helo=smtp04.mrf.mail.rcn.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DpybL-0007jN-LQ; Tue, 05 Jul 2005 21:21:23 -0400 Original-Received: from 65-78-24-4.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com (HELO raeburn.org) (65.78.24.4) by smtp04.mrf.mail.rcn.net with ESMTP; 05 Jul 2005 21:15:03 -0400 X-IronPort-AV: i="3.93,263,1115006400"; d="scan'208"; a="55359949:sNHT928990500" Original-Received: from [18.18.1.76] (KEN-WIRELESS.MIT.EDU [18.18.1.76]) by raeburn.org (8.12.11/8.12.11) with ESMTP id j661F0Hh001202; Tue, 5 Jul 2005 21:15:00 -0400 (EDT) In-Reply-To: <87wto4j44m.fsf@kanga.tapsellferrier.co.uk> Original-To: Nic Ferrier X-Mailer: Apple Mail (2.622) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:40483 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40483 On Jul 5, 2005, at 18:10, Nic Ferrier wrote: > Why can't you just pre-parse the data parsed to the base64 decoder? I > believe that's the correct behaviour. A base64 decoder should decode > base64, not "base64 but also it does this extra trick if you wave your > hand in the air" Except "this extra trick" is specifically outlined as an option in the base64 spec (RFC 3548), and MIME invokes that option. So proper "MIME base64 decoding" would require this extra step of throwing away characters that are not part of a base64 encoding, and then making a second pass with the strict base64 decoder. In fact, as I read RFC 3548 section 2.3, the CR/LF line break sequences in MIME messages are not part of the base64 alphabet, and therefore fns.c:IS_BASE64_IGNORABLE already implements a limited form of what Marc is asking for. Ken