> So, do we have to find a fix or is such an additional blank line
> in Base64 MIME parts acceptable?

IMO it is acceptable.
--
francois.pie...@overbyte.be
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be

----- Original Message ----- 
From: "Arno Garrels" <arno.garr...@gmx.de>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Tuesday, January 20, 2009 12:03 PM
Subject: [twsocket] OverbyteIcsMimeUtils.pas - DoFileEncBase64
problemdetecting end of stream


> Hi,
>
> When encoded data size is divisible by 72 (line length) DoFileEncBase64()
> returns More = TRUE upon the last data chunk even though there are no
> more bytes left in the stream. It is because More is just calculated by
> "More := (ByteCount = 3);".
> In those cases an additional blank line may be inserted at the end of
> the Base64 data in the MIME part (if the part isn't the last).
> You can reproduce this issue with the MailSnd demo and the file
> attachments ics_logo.gif and fp_small.gif.
>
> A reliable way to calculate More was
> "More := Stream.Position < Stream.Size;"
> however that is slower since Stream.Size has to seek to the end of the
> stream and the back to current position on each call of DoFileEncBase64().
> (Instead of Stream.Size we could also check against file size, however
> only with ShareMode fmShareDenyWrite).
>
> So, do we have to find a fix or is such an additional blank line in Base64
> MIME parts acceptable?
>
> What do you think?
>
> --
> Arno Garrels [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to