Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 300B0F340 for ; Wed, 20 Mar 2013 10:48:43 +0000 (UTC) Received: (qmail 84592 invoked by uid 500); 20 Mar 2013 10:48:42 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 84496 invoked by uid 500); 20 Mar 2013 10:48:42 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 84465 invoked by uid 99); 20 Mar 2013 10:48:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Mar 2013 10:48:41 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sebbaz@gmail.com designates 74.125.82.181 as permitted sender) Received: from [74.125.82.181] (HELO mail-we0-f181.google.com) (74.125.82.181) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Mar 2013 10:48:37 +0000 Received: by mail-we0-f181.google.com with SMTP id p43so1213345wea.26 for ; Wed, 20 Mar 2013 03:48:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=Z747twwnlq0DxDM5G4N42awkf4SwC0kwoeBSMwFXuD4=; b=yon5AH2Hb8iDWw3FVDdhLHEqpLQfyCtPzp/1dTJpKn8vN48i9fsJE9A1Px9ZYgIWaj AjE87QTEipnnkYWrZZMxkcdqA1AT3ZZuNKbVsDtJaISHah6in9wuJImFrv2rLhtePGfd qTuoBEZI69O4SALaDtj5vyJWsHZFOLXpUe3mKhP0inK4L0QcDudNbZD/f8iDyrlArAGx aJdNJ2aW9XZVHi5onk2rhUPOuU2bqc3hQmQ58j1O4tDOG4sjSc7IozsUikCAXLbGAm7O EBh071S6E+YJPr9dZdVM/VHy5kkHwpRSnqRB6IJcbtg+T1UHD8CmF4Vzd2TO0BYjYGnU GE/w== MIME-Version: 1.0 X-Received: by 10.180.8.4 with SMTP id n4mr9170943wia.13.1363776495829; Wed, 20 Mar 2013 03:48:15 -0700 (PDT) Received: by 10.194.61.236 with HTTP; Wed, 20 Mar 2013 03:48:15 -0700 (PDT) In-Reply-To: References: <4183552502473640450@unknownmsgid> <-8624072539068019852@unknownmsgid> Date: Wed, 20 Mar 2013 10:48:15 +0000 Message-ID: Subject: Re: [fileupload] towards 1.3 release - feedbacks required From: sebb To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On 20 March 2013 08:26, Simone Tripodi wrote: > priceless!!! > >> At present it treats an embedded PAD as the end of input (as per >> Codec) but maybe it would be better to only allow 1 or 2 PADs at the >> end? > > IMHO having such behaviour is acceptable, but if it doesn't cost you > too much, having the behaviour described in Wikipedia[1] is a 'nice to > have': As far as I know, it already behaves as per the article, except I have just noticed that RFC2045 requires invalid characters to be ignored. That should be trivial to fix now that the code has been re-organised. The article does not describe how to handle embedded PADs > +-----------------------------------------------------------+ > Decoding Base64 with padding > When decoding Base64 text, 4 characters are typically converted back > to 3 bytes. The only exceptions are when padding characters exist. A > single '=' indicates that the 4 characters will decode to only 2 > bytes, while 2 '='s indicates that the 4 characters will decode to > only a single byte. This example illustrates: > Encoded text ends with: YW55IGNhcm5hbCBwbGVhcw== Block with 2 '='s > decodes to 1 character: any carnal pleas > Encoded text ends with: YW55IGNhcm5hbCBwbGVhc3U= Block with 1 '=' > decodes to 2 characters: any carnal pleasu > Encoded text ends with: YW55IGNhcm5hbCBwbGVhc3Vy Block with 0 '='s > decodes to 3 characters: any carnal pleasur > +-----------------------------------------------------------+ > > Thanks! > -Simo > > [1] http://en.wikipedia.org/wiki/Base64 > > http://people.apache.org/~simonetripodi/ > http://simonetripodi.livejournal.com/ > http://twitter.com/simonetripodi > http://www.99soft.org/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org