node-red-contrib-bluemix-hdfs
Advanced tools
Comparing version 0.1.1 to 0.1.2
/** | ||
* Copyright 2013 IBM Corp. | ||
* Copyright 2013, 2015 IBM Corp. | ||
* | ||
@@ -24,3 +24,2 @@ * Licensed under the Apache License, Version 2.0 (the "License"); | ||
//var mustache = require("mustache"); | ||
var querystring = require("querystring"); | ||
//var fs = require("fs"); | ||
@@ -40,18 +39,2 @@ | ||
function rawBodyParser(req, res, next) { | ||
if (req._body) return next(); | ||
req.body = ""; | ||
req._body = true; | ||
getBody(req, { | ||
limit: '1mb', | ||
length: req.headers['content-length'], | ||
encoding: 'utf8' | ||
}, function (err, buf) { | ||
if (err) return next(err); | ||
req.body = buf; | ||
next(); | ||
}); | ||
} | ||
var bigcredentials = false; | ||
@@ -341,22 +324,16 @@ | ||
RED.httpAdmin.post('/http-request/:id',function(req,res) { | ||
var body = ""; | ||
req.on('data', function(chunk) { | ||
body+=chunk; | ||
}); | ||
req.on('end', function(){ | ||
var newCreds = querystring.parse(body); | ||
var credentials = RED.nodes.getCredentials(req.params.id)||{}; | ||
if (newCreds.user == null || newCreds.user == "") { | ||
delete credentials.user; | ||
} else { | ||
credentials.user = newCreds.user; | ||
} | ||
if (newCreds.password == "") { | ||
delete credentials.password; | ||
} else { | ||
credentials.password = newCreds.password||credentials.password; | ||
} | ||
RED.nodes.addCredentials(req.params.id,credentials); | ||
res.send(200); | ||
}); | ||
var newCreds = body.req; | ||
var credentials = RED.nodes.getCredentials(req.params.id)||{}; | ||
if (newCreds.user == null || newCreds.user == "") { | ||
delete credentials.user; | ||
} else { | ||
credentials.user = newCreds.user; | ||
} | ||
if (newCreds.password == "") { | ||
delete credentials.password; | ||
} else { | ||
credentials.password = newCreds.password||credentials.password; | ||
} | ||
RED.nodes.addCredentials(req.params.id,credentials); | ||
res.send(200); | ||
}); |
@@ -9,3 +9,3 @@ { | ||
"description": "Big Data node on IBM Bluemix. \n\nThis Node-RED node runs only in the IBM Bluemix environment", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"keywords": [ | ||
@@ -20,2 +20,3 @@ "node-red" | ||
}, | ||
"license": "Apache", | ||
"node-red": { | ||
@@ -22,0 +23,0 @@ "nodes": { |
@@ -6,3 +6,3 @@ bluemixhdfs | ||
In case there is no bound IBM Analytics for HDFS, then the node will warn about its inability to connect to the HDFS system. | ||
In case there is no bound IBM Analytics for HDFS, then the node will warn about its inability to connect to the HDFS system and will not work. | ||
@@ -9,0 +9,0 @@ |
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
60653
1
302