diff --git a/lib/plugins/index.js b/lib/plugins/index.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/index.js
+++ b/lib/plugins/index.js
@@ -594,7 +594,7 @@ function requestRules(options, callback, retryCount) {
     if (err && retryCount < 5) {
       return requestRules(options, callback, ++retryCount);
     }
-    if (res.statusCode == 304) {
+    if (res && res.statusCode == 304) {
       return callback(false, null, null, null, res);
     }
     body = body && body.trim();
diff --git a/lib/util/http-mgr.js b/lib/util/http-mgr.js
index <HASH>..<HASH> 100644
--- a/lib/util/http-mgr.js
+++ b/lib/util/http-mgr.js
@@ -62,7 +62,7 @@ function request(options, callback) {
     err && client.abort();
     if (!done) {
       done = true;
-      callback(err, body, res);
+      callback(err, body, res || '');
     }
   };
   var addTimeout = function() {
refactor: http-mgr