diff --git a/lib/node-get/node-get.js b/lib/node-get/node-get.js index bb5861d..7eaba1a 100644 --- a/lib/node-get/node-get.js +++ b/lib/node-get/node-get.js @@ -130,6 +130,12 @@ Get.prototype.perform = function(callback, times) { // ----------- // Servers can send a full redirect location // or a short form, like a hyperlink. Handle both. + + if (response.headers['set-cookie']) { + this.headers.cookie = this.headers.cookie || "" + this.headers.cookie = response.headers['set-cookie'].join(';') + } + if (url.parse(response.headers.location).protocol) { this.uri = response.headers.location; } else {