perfsonar-dev - perfsonar: r4987 - branches/simple-service-with-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist
Subject: perfsonar development work
List archive
perfsonar: r4987 - branches/simple-service-with-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist
Chronological Thread
- From:
- To:
- Subject: perfsonar: r4987 - branches/simple-service-with-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist
- Date: Wed, 25 Feb 2009 09:28:50 -0500
Author: mac
Date: 2009-02-25 09:28:50 -0500 (Wed, 25 Feb 2009)
New Revision: 4987
Modified:
branches/simple-service-with-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist/HTTPAccess.java
Log:
Change base64 encoding into apache commons encoder
Modified:
branches/simple-service-with-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist/HTTPAccess.java
===================================================================
---
branches/simple-service-with-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist/HTTPAccess.java
2009-02-23 15:54:29 UTC (rev 4986)
+++
branches/simple-service-with-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist/HTTPAccess.java
2009-02-25 14:28:50 UTC (rev 4987)
@@ -6,8 +6,10 @@
import java.net.HttpURLConnection;
import java.net.URL;
+import org.apache.commons.codec.binary.Base64;
+
/**
* This class implements basic HTTP methods of eXist DB XML
* document manipulating. Most of them may be used in communication
@@ -184,10 +186,14 @@
if (debug) System.out.println("[D] authorization Basic "+
username+":"+password);
- String basicAuth = "Basic " +
- (new sun.misc.BASE64Encoder().
- encode((username+":"+password).getBytes()));
+ //encode BASE 64
+ String userAndPass = username+":"+password;
+ Base64 base64encoder = new Base64();
+ String userAndPass64 = new String(base64encoder.encode(
+ userAndPass.getBytes()));
+ String basicAuth = "Basic " + userAndPass64;
+
httpUrlConnection.setRequestProperty(
"Authorization", basicAuth);
- perfsonar: r4987 - branches/simple-service-with-base2/src/main/java/org/perfsonar/base2/service/storage/xml/exist, svnlog, 02/25/2009
Archive powered by MHonArc 2.6.16.