From 5ffe426edbc28ddd541bf1416e0ddf60d00d999a Mon Sep 17 00:00:00 2001 From: Mark Vayngrib Date: Tue, 12 May 2015 17:36:32 -0400 Subject: [PATCH] make sure response headers are there --- lib/response.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/response.js b/lib/response.js index f83d761..cc588ba 100644 --- a/lib/response.js +++ b/lib/response.js @@ -87,6 +87,7 @@ Response.prototype.handle = function (res) { } } else if (res.readyState === 4) { + if (!this.headers) this.headers = parseHeaders(res); if (!this.statusCode) { this.statusCode = res.status; this.emit('ready');