Merge lp:~zorba-coders/zorba/new-base64-api-email into lp:zorba/email-module

Proposed by Paul J. Lucas
Status: Merged
Approved by: Paul J. Lucas
Approved revision: 59
Merged at revision: 59
Proposed branch: lp:~zorba-coders/zorba/new-base64-api-email
Merge into: lp:zorba/email-module
Diff against target: 30 lines (+5/-4)
2 files modified
src/com/zorba-xquery/www/modules/email/imap.xq.src/imap_function.cpp (+3/-3)
src/com/zorba-xquery/www/modules/email/smtp.xq.src/mime_handler.cpp (+2/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/new-base64-api-email
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+177673@code.launchpad.net

Commit message

Using the new Base64 API.

Description of the change

Using the new Base64 API.

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue succeeded - proposal merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/com/zorba-xquery/www/modules/email/imap.xq.src/imap_function.cpp'
2--- src/com/zorba-xquery/www/modules/email/imap.xq.src/imap_function.cpp 2013-06-12 13:36:28 +0000
3+++ src/com/zorba-xquery/www/modules/email/imap.xq.src/imap_function.cpp 2013-07-30 19:18:26 +0000
4@@ -927,9 +927,9 @@
5 aEncoding = ENC8BIT;
6 if (!isTextOrXMLContentType(aContentType)) {
7 // binary content needs to be base64 encoded for zorba
8- zorba::String lInput(aResult.c_str());
9- zorba::String lOutput = zorba::base64::encode(lInput);
10- aResult = lOutput.c_str();
11+ std::string lOutput;
12+ zorba::base64::encode(aResult, &lOutput);
13+ aResult = lOutput;
14 }
15 }
16 else if (aEncoding == ENCBASE64) {
17
18=== modified file 'src/com/zorba-xquery/www/modules/email/smtp.xq.src/mime_handler.cpp'
19--- src/com/zorba-xquery/www/modules/email/smtp.xq.src/mime_handler.cpp 2013-06-12 13:36:28 +0000
20+++ src/com/zorba-xquery/www/modules/email/smtp.xq.src/mime_handler.cpp 2013-07-30 19:18:26 +0000
21@@ -85,7 +85,8 @@
22 // if string contains non-ascii chars, we encode it with
23 // base64 encoding and generate a header value according to
24 // http://tools.ietf.org/html/rfc2047 (MIME encoded-word syntax).
25- zorba::String lEncodedValue = zorba::base64::encode(aString);
26+ zorba::String lEncodedValue;
27+ zorba::base64::encode(aString, &lEncodedValue);
28 zorba::String lFullValue = zorba::String("=?UTF-8?B?")
29 + lEncodedValue
30 + zorba::String("?=");

Subscribers

People subscribed via source and target branches

to all changes: