summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/npm-registry-client/lib/request.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/npm-registry-client/lib/request.js')
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/request.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/deps/npm/node_modules/npm-registry-client/lib/request.js b/deps/npm/node_modules/npm-registry-client/lib/request.js
index e4dc399572..567fc8dbe4 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/request.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/request.js
@@ -64,6 +64,13 @@ function regRequest (uri, params, cb_) {
var self = this
this.attempt(function (operation) {
makeRequest.call(self, uri, params, function (er, parsed, raw, response) {
+ if (response) {
+ self.log.verbose('headers', response.headers)
+ if (response.headers['npm-notice']) {
+ self.log.warn('notice', response.headers['npm-notice'])
+ }
+ }
+
if (!er || (er.message && er.message.match(/^SSL Error/))) {
if (er) er.code = 'ESSL'
return cb(er, parsed, raw, response)
@@ -79,12 +86,6 @@ function regRequest (uri, params, cb_) {
self.log.info('retry', 'will retry, error on last attempt: ' + er)
return undefined
}
- if (response) {
- self.log.verbose('headers', response.headers)
- if (response.headers['npm-notice']) {
- self.log.warn('notice', response.headers['npm-notice'])
- }
- }
cb.apply(null, arguments)
})
})