mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 730637 - Base64 support for HttpClient in Android 2.1. r=nalexander
This commit is contained in:
parent
e05ad0c8aa
commit
1071670860
@ -82,4 +82,4 @@ public class HttpClientAndroidLog {
|
||||
Log.i(logTag, message.toString(), t);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -78,4 +78,4 @@ public interface RedirectStrategy {
|
||||
HttpResponse response,
|
||||
HttpContext context) throws ProtocolException;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -43,4 +43,4 @@ public interface Idn {
|
||||
* @return the Unicode domain name
|
||||
*/
|
||||
String toUnicode(String punycode);
|
||||
}
|
||||
}
|
||||
|
@ -72,4 +72,4 @@ public class JdkIdn implements Idn {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -123,4 +123,4 @@ public class Rfc3492Idn implements Idn {
|
||||
return output.toString();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -59,4 +59,4 @@ public interface ClientCookie extends Cookie {
|
||||
|
||||
boolean containsAttribute(String name);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ package ch.boye.httpclientandroidlib.impl.auth;
|
||||
|
||||
import ch.boye.httpclientandroidlib.annotation.NotThreadSafe;
|
||||
|
||||
import android.util.Base64;
|
||||
import org.mozilla.apache.commons.codec.binary.Base64;
|
||||
import ch.boye.httpclientandroidlib.Header;
|
||||
import ch.boye.httpclientandroidlib.HttpRequest;
|
||||
import ch.boye.httpclientandroidlib.auth.AuthenticationException;
|
||||
@ -161,8 +161,8 @@ public class BasicScheme extends RFC2617Scheme {
|
||||
tmp.append(":");
|
||||
tmp.append((credentials.getPassword() == null) ? "null" : credentials.getPassword());
|
||||
|
||||
byte[] base64password = Base64.encode(
|
||||
EncodingUtils.getBytes(tmp.toString(), charset), Base64.NO_WRAP);
|
||||
byte[] base64password = Base64.encodeBase64(
|
||||
EncodingUtils.getBytes(tmp.toString(), charset));
|
||||
|
||||
CharArrayBuffer buffer = new CharArrayBuffer(32);
|
||||
if (proxy) {
|
||||
|
@ -33,7 +33,7 @@ import java.util.Arrays;
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import android.util.Base64;
|
||||
import org.mozilla.apache.commons.codec.binary.Base64;
|
||||
import ch.boye.httpclientandroidlib.util.EncodingUtils;
|
||||
|
||||
/**
|
||||
@ -612,8 +612,8 @@ final class NTLMEngineImpl implements NTLMEngine {
|
||||
|
||||
/** Constructor to use when message contents are known */
|
||||
NTLMMessage(String messageBody, int expectedType) throws NTLMEngineException {
|
||||
messageContents = Base64.decode(EncodingUtils.getBytes(messageBody,
|
||||
DEFAULT_CHARSET), Base64.NO_WRAP);
|
||||
messageContents = Base64.decodeBase64(EncodingUtils.getBytes(messageBody,
|
||||
DEFAULT_CHARSET));
|
||||
// Look for NTLM message
|
||||
if (messageContents.length < SIGNATURE.length)
|
||||
throw new NTLMEngineException("NTLM message decoding error - packet too short");
|
||||
@ -746,7 +746,7 @@ final class NTLMEngineImpl implements NTLMEngine {
|
||||
} else {
|
||||
resp = messageContents;
|
||||
}
|
||||
return EncodingUtils.getAsciiString(Base64.encode(resp, Base64.NO_WRAP));
|
||||
return EncodingUtils.getAsciiString(Base64.encodeBase64(resp));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -199,4 +199,4 @@ public class DefaultRedirectStrategy implements RedirectStrategy {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -218,4 +218,4 @@ public class BestMatchSpec implements CookieSpec {
|
||||
return "best-match";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -64,4 +64,4 @@ public class RFC2965CommentUrlAttributeHandler implements CookieAttributeHandler
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -64,4 +64,4 @@ public class RFC2965DiscardAttributeHandler implements CookieAttributeHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -191,4 +191,4 @@ public class RFC2965DomainAttributeHandler implements CookieAttributeHandler {
|
||||
return effectiveHostWithoutDomain.indexOf('.') == -1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -95,4 +95,4 @@ public class RFC2965VersionAttributeHandler implements CookieAttributeHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user