[Seaside] String>>#base64Encoded

Sven Van Caekenberghe sven at beta9.be
Mon Mar 21 20:42:06 UTC 2011


It took me quite some time today to figure this out and it might be relevant for others too:

it turns out that String>>#base64Encoded introduces newlines which you definitively do not want when doing Basic HTTP Encoding for example. The tricky part is that it works when you stay below a certain length.

This can easily be solved by invoking Base64MimeConvertor with the #mimeEncode: <string> multiLine: false

Zinc HTTP Components now does this consistently through ZnUtils class>>#encodeBase64:


More information about the seaside mailing list