mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Only normalise known headers in http node
This commit is contained in:
parent
5f77531a39
commit
1f95071a37
@ -171,7 +171,13 @@ module.exports = function(RED) {
|
|||||||
if (msg.headers) {
|
if (msg.headers) {
|
||||||
for (var v in msg.headers) {
|
for (var v in msg.headers) {
|
||||||
if (msg.headers.hasOwnProperty(v)) {
|
if (msg.headers.hasOwnProperty(v)) {
|
||||||
opts.headers[v.toLowerCase()] = msg.headers[v];
|
var name = v.toLowerCase();
|
||||||
|
if (name !== "content-type" && name !== "content-length") {
|
||||||
|
// only normalise the known headers used later in this
|
||||||
|
// function. Otherwise leave them alone.
|
||||||
|
name = v;
|
||||||
|
}
|
||||||
|
opts.headers[name] = msg.headers[v];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user