Description
java.lang.NullPointerException: charsetName
at java.lang.String.<init>(String.java:403)
at java.lang.String.<init>(String.java:433)
at org.apache.xmlrpc.util.HttpUtil.parseAuthorization(HttpUtil.java:149)
at org.apache.xmlrpc.webserver.Connection.getRequestConfig(Connection.java:162)
at org.apache.xmlrpc.webserver.Connection.run(Connection.java:174)
at org.apache.xmlrpc.util.ThreadPool$MyThread.runTask(ThreadPool.java:71)
at org.apache.xmlrpc.util.ThreadPool$MyThread.run(ThreadPool.java:87)
Code in question, from HttpUtil.parseAuthorization():
String auth = st.nextToken();
try {
byte[] c = Base64.decode(auth.toCharArray(), 0, auth.length());
String str = new String(c, pConfig.getBasicEncoding()); <-- Will return null
int col = str.indexOf(':');
if (col >= 0)
If no charset is specifed, shouldn't the code assume UTF-8 (or ISO-8859-1)?
Attachments
Issue Links
- is duplicated by
-
XMLRPC-102 Basic username and password don't get sent to the Servlet
- Closed