e14n / webfinger

Webfinger client library for Node.js
Apache License 2.0
40 stars 10 forks source link

xml2js 0.2 defaults have changed #26

Open timretout opened 10 years ago

timretout commented 10 years ago

As part of packaging webfinger for Debian, I noticed the test suite fails with xml2js 0.2.8. This patch fixes it:

Index: node-webfinger/lib/webfinger.js
===================================================================
--- node-webfinger.orig/lib/webfinger.js
+++ node-webfinger/lib/webfinger.js
@@ -95,7 +95,7 @@ var xrd2jrd = function(str, callback) {
     };
     Step(
         function() {
-            var parser = new xml2js.Parser();
+            var parser = new xml2js.Parser(xml2js.defaults["0.1"]);
             parser.parseString(str, this);
         },
         function(err, doc) {

Obviously the "real" fix would be to look into what has actually changed between 0.1 and 0.2, but I have not explored that yet.