X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fnet%2FHTTP.java;fp=src%2Forg%2Fibex%2Fnet%2FHTTP.java;h=894a23684d0b203c2e55b87d442fd51fc1c26911;hb=07da26d8a9a017bffb5c519a36da57d5df0fd439;hp=ebdbf91addb9f5b0b491ff1e38e873af4f4eb142;hpb=4ff9c4860dddf17af8ced9d4cec22c0b879f6f66;p=org.ibex.net.git diff --git a/src/org/ibex/net/HTTP.java b/src/org/ibex/net/HTTP.java index ebdbf91..894a236 100644 --- a/src/org/ibex/net/HTTP.java +++ b/src/org/ibex/net/HTTP.java @@ -491,7 +491,7 @@ public class HTTP { if (h.get("AUTHTYPE").equals("Basic")) { if (authCache.get(originalUrl) != null) throw new HTTPException("username/password rejected"); - authCache.put(originalUrl, "Basic " + new String(Base64.encode(userInfo.getBytes("UTF8")))); + authCache.put(originalUrl, "Basic " + new String(Encode.toBase64(userInfo.getBytes("UTF8")))); } else if (h.get("AUTHTYPE").equals("Digest")) { if (authCache.get(originalUrl) != null && !"true".equals(h.get("stale"))) @@ -528,7 +528,7 @@ public class HTTP { if (style.equals("NTLM") && Proxy.Authorization.authorization2 == null) { Log.info(this, "Proxy identified itself as NTLM, sending Type 1 packet"); - Proxy.Authorization.authorization2 = "NTLM " + Base64.encode(Proxy.NTLM.type1); + Proxy.Authorization.authorization2 = "NTLM " + Encode.toBase64(Proxy.NTLM.type1); return; } /* @@ -538,7 +538,7 @@ public class HTTP { */ if (style.equals("Basic")) { Proxy.Authorization.authorization2 = - "Basic " + new String(Base64.encode(Proxy.Authorization.authorization.getBytes("UTF8"))); + "Basic " + new String(Encode.toBase64(Proxy.Authorization.authorization.getBytes("UTF8"))); } else if (style.equals("Digest")) { String A1 = Proxy.Authorization.authorization.substring(0, userInfo.indexOf(':')) + ":" + h.get("realm") + ":" + @@ -557,7 +557,7 @@ public class HTTP { } else if (style.equals("NTLM")) { Log.info(this, "Proxy identified itself as NTLM, got Type 2 packet"); - byte[] type2 = Base64.decode(((String)h0.get("proxy-authenticate")).substring(5).trim()); + byte[] type2 = Encode.fromBase64(((String)h0.get("proxy-authenticate")).substring(5).trim()); for(int i=0; i