Commit e534eb68 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Don't add line wraps to encoded base64.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3531 b35dd754-fafc-0310-a699-88a17e54d16e
parent 7e7a6c1b
...@@ -440,7 +440,11 @@ public class StringUtils { ...@@ -440,7 +440,11 @@ public class StringUtils {
* @return a base64 encode String. * @return a base64 encode String.
*/ */
public static String encodeBase64(byte[] data) { public static String encodeBase64(byte[] data) {
return Base64.encodeBytes(data); // Encode the String. We pass in a flag to specify that line
// breaks not be added. This is consistent with our previous base64
// implementation. Section 2.1 of 3548 (base64 spec) also specifies
// no line breaks by default.
return Base64.encodeBytes(data, Base64.DONT_BREAK_LINES);
} }
/** /**
...@@ -462,7 +466,7 @@ public class StringUtils { ...@@ -462,7 +466,7 @@ public class StringUtils {
/** /**
* Converts a line of text into an array of lower case words using a * Converts a line of text into an array of lower case words using a
* BreakIterator.wordInstance().<p> * BreakIterator.wordInstance().<p>
* *
* This method is under the Jive Open Source Software License and was * This method is under the Jive Open Source Software License and was
* written by Mark Imbriaco. * written by Mark Imbriaco.
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment