|
|
@ -359,7 +359,7 @@ OutgoingMessage.prototype._storeHeader = function (firstLine, headers) { |
|
|
|
|
|
|
|
if (headers) { |
|
|
|
var keys = Object.keys(headers); |
|
|
|
var isArray = (headers instanceof Array); |
|
|
|
var isArray = (Array.isArray(headers)); |
|
|
|
for (var i = 0, l = keys.length; i < l; i++) { |
|
|
|
var key = keys[i]; |
|
|
|
if (isArray) { |
|
|
@ -1036,7 +1036,7 @@ exports.cat = function (url, encoding_, headers_) { |
|
|
|
var url = require("url").parse(url); |
|
|
|
|
|
|
|
var hasHost = false; |
|
|
|
if (headers instanceof Array) { |
|
|
|
if (Array.isArray(headers)) { |
|
|
|
for (var i = 0, l = headers.length; i < l; i++) { |
|
|
|
if (headers[i][0].toLowerCase() === 'host') { |
|
|
|
hasHost = true; |
|
|
|