projects
/
org.ibex.net.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4ff9c48
)
updated to use new util.Encode
author
adam
<adam@megacz.com>
Thu, 6 Jan 2005 23:41:48 +0000
(23:41 +0000)
committer
adam
<adam@megacz.com>
Thu, 6 Jan 2005 23:41:48 +0000
(23:41 +0000)
darcs-hash:
20050106234148
-5007d-
17e0fc0aa210017e0f3c28ba09d9c909d1ea0566
.gz
src/org/ibex/net/HTTP.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/net/HTTP.java
b/src/org/ibex/net/HTTP.java
index
ebdbf91
..
894a236
100644
(file)
--- 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");
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")))
} 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");
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;
}
/*
return;
}
/*
@@
-538,7
+538,7
@@
public class HTTP {
*/
if (style.equals("Basic")) {
Proxy.Authorization.authorization2 =
*/
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") + ":" +
} 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");
} 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<type2.length; i += 4) {
String log = "";
if (i<type2.length) log += Integer.toString(type2[i] & 0xff, 16) + " ";
for(int i=0; i<type2.length; i += 4) {
String log = "";
if (i<type2.length) log += Integer.toString(type2[i] & 0xff, 16) + " ";
@@
-569,7
+569,7
@@
public class HTTP {
// FEATURE: need to keep the connection open between type1 and type3
// FEATURE: finish this
//byte[] type3 = Proxy.NTLM.getResponse(
// FEATURE: need to keep the connection open between type1 and type3
// FEATURE: finish this
//byte[] type3 = Proxy.NTLM.getResponse(
- //Proxy.Authorization.authorization2 = "NTLM " + Base64.encode(type3));
+ //Proxy.Authorization.authorization2 = "NTLM " + Encode.toBase64(type3));
}
}
}
}