Skip to content

Commit dab5853

Browse files
author
Lukasz Czerwinski
committed
Handle <undefined>undefined</undefined> in server response
1 parent be18498 commit dab5853

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/xmlrpc_lib.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,9 @@ xmlrpcval.prototype.init = function (val, type) {
876876
this.mytype = 3;
877877
this.myidx = 0;
878878
break;
879+
case 'undefined':
880+
this.mytype = 9;
881+
break;
879882
default:
880883
xmlrpc_error_log('XML-RPC: xmlrpcval::xmlrpcval: not a known type ('+type+')');
881884
}
@@ -2658,6 +2661,14 @@ function parseXmlrpcValue(node, return_jsvals)
26582661
break;
26592662
}
26602663
// fall through voluntarily
2664+
2665+
case 'undefined':
2666+
var text = getChildText(child);
2667+
if (text != 'undefined') {
2668+
console.log("Warning: <undefined> tag contained value: " + text + " (expected: string \"undefined\")");
2669+
}
2670+
ret = null;
2671+
break;
26612672
default:
26622673
throw 'Found incorrect element inside \'value\' :'+ child.tagName;
26632674

0 commit comments

Comments
 (0)