Bump for 0.20.7

This commit is contained in:
Nick O'Leary
2019-07-05 11:12:26 +01:00
parent 083d6c5125
commit aab0b0b4bf
10 changed files with 51 additions and 40 deletions

View File

@@ -1291,6 +1291,7 @@ describe('HTTP Request Node', function() {
var n1 = helper.getNode("n1");
var n2 = helper.getNode("n2");
n2.on("input", function(msg) {
console.log(msg.payload);
try {
msg.payload.headers.should.have.property('content-type').which.startWith('application/json');
msg.payload.headers.should.not.have.property('x-node-red-request-node');
@@ -1301,7 +1302,11 @@ describe('HTTP Request Node', function() {
});
// Pass in a headers property with an unmodified x-node-red-request-node hash
// This should cause the node to ignore the headers
n1.receive({payload:{foo:"bar"}, headers: { 'content-type': 'text/plain', "x-node-red-request-node":"67690139"}});
var headers = { 'content-type': 'text/plain' };
headers['x-node-red-request-node'] = require("hash-sum")(headers);
n1.receive({payload:{foo:"bar"}, headers: headers});
});
});