roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r573249 - /roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/HandlerBaseTest.java
Date Thu, 06 Sep 2007 13:00:37 GMT
Author: snoopdave
Date: Thu Sep  6 06:00:36 2007
New Revision: 573249

URL: http://svn.apache.org/viewvc?rev=573249&view=rev
Log:
Use Base64 from commons codec rather than the one from HTTPClient

Modified:
    roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/HandlerBaseTest.java

Modified: roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/HandlerBaseTest.java
URL: http://svn.apache.org/viewvc/roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/HandlerBaseTest.java?rev=573249&r1=573248&r2=573249&view=diff
==============================================================================
--- roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/HandlerBaseTest.java
(original)
+++ roller/branches/roller_4.1_dev/apps/weblogger/test/java/org/apache/roller/weblogger/webservices/adminapi/HandlerBaseTest.java
Thu Sep  6 06:00:36 2007
@@ -19,6 +19,7 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.HttpMethod;
 import org.apache.commons.httpclient.methods.DeleteMethod;
@@ -26,7 +27,6 @@
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.apache.commons.httpclient.methods.PostMethod;
 import org.apache.commons.httpclient.methods.PutMethod;
-import org.apache.commons.httpclient.util.Base64;
 import org.apache.roller.weblogger.webservices.adminprotocol.sdk.MemberEntry;
 import org.apache.roller.weblogger.webservices.adminprotocol.sdk.MemberEntrySet;
 import org.apache.roller.weblogger.webservices.adminprotocol.sdk.UnexpectedRootElementException;
@@ -391,7 +391,8 @@
     
     private static void addAuthHeader(HttpMethod method, String user, String password) {
         String credentials = user + ":" + password;
-        method.setRequestHeader("Authorization", "Basic "  + new String(Base64.encode(credentials.getBytes())));
+        Base64 base64 = new Base64();
+        method.setRequestHeader("Authorization", "Basic "  + new String(base64.encode(credentials.getBytes())));
     }
     
 }



Mime
View raw message