You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by na...@apache.org on 2001/06/28 22:12:11 UTC
cvs commit: xml-soap/java/src/org/apache/soap/util/net Relay.java
nagy 01/06/28 13:12:11
Modified: java/src/org/apache/soap/transport/http
SOAPHTTPConnection.java
java/src/org/apache/soap/util/net Relay.java
Log:
Fixed encoding for systems whose default codepage is not 8859_1. See http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2387 for the details.
PR: 2387
Revision Changes Path
1.19 +11 -2 xml-soap/java/src/org/apache/soap/transport/http/SOAPHTTPConnection.java
Index: SOAPHTTPConnection.java
===================================================================
RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/transport/http/SOAPHTTPConnection.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- SOAPHTTPConnection.java 2001/05/21 22:23:14 1.18
+++ SOAPHTTPConnection.java 2001/06/28 20:12:06 1.19
@@ -163,8 +163,17 @@
this.proxyPassword = password;
}
- private static String encodeAuth(String userName, String password) {
- return Base64.encode((userName + ":" + password).getBytes());
+ private static String encodeAuth(String userName, String password)
+ throws SOAPException
+ {
+ try
+ {
+ return Base64.encode((userName + ":" + password).getBytes("8859_1"));
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ throw new SOAPException (Constants.FAULT_CODE_CLIENT, e.getMessage(), e);
+ }
}
/**
1.4 +1 -1 xml-soap/java/src/org/apache/soap/util/net/Relay.java
Index: Relay.java
===================================================================
RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/util/net/Relay.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Relay.java 2000/09/01 03:53:05 1.3
+++ Relay.java 2001/06/28 20:12:09 1.4
@@ -89,7 +89,7 @@
out.write (buf, 0, n);
out.flush ();
if (ta != null) {
- ta.append (new String (buf, 0, n));
+ ta.append (new String (buf, 0, n, "8859_1"));
}
}
} catch (IOException e) {