From 326e37ac190824e42967f372d022e3a3a6c26480 Mon Sep 17 00:00:00 2001 From: Martin Schuhfuss Date: Thu, 20 Sep 2012 12:24:44 +0200 Subject: [PATCH] compatibility with xml2js-0.2.x and node-0.9.x - the xml2js-parser changed the defaults for parsing and the format for returned data (see http://goo.gl/IoUDH) - the _idleStart-time was moved away from the request-objects in node --- routes/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/index.js b/routes/index.js index 1ad7f56..750ea77 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,19 +1,19 @@ var qs = require("querystring"), xml2js = require("xml2js"), - parser = new xml2js.Parser(), config = require("../config"), crypto = require("crypto"), tar = require("tar"), fs = require("fs"), util = require("util"), exec = require('child_process').exec, - child, path = require("path"), multiparter = require("multiparter"), http = require("http"), mime = require("mime"), url = require("url"); +var child, parser = new xml2js.Parser(xml2js.defaults["0.1"]); + function md5HexDigest(data) { var string = new Buffer(data, "hex"); @@ -111,7 +111,7 @@ fs.createReadStream(file)); }); });*/ } - console.log(req.socket._idleStart.getTime()); + //console.log(req.socket._idleStart.getTime()); console.log(new Date().getTime()); console.log("\nFinished Upload successfully."); res.render('uploadSuccess', {layout: false});