diff options
-rw-r--r-- | lib/utils/registry.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/utils/registry.js b/lib/utils/registry.js index 42147e1fd..4a077db6e 100644 --- a/lib/utils/registry.js +++ b/lib/utils/registry.js @@ -6,7 +6,7 @@ exports.tag = tag; exports.adduser = adduser; var npm = require("../../npm"), - http = require("http"), + http = require("http_old"), url = require("url"), log = require("./log"), uuid = require("./uuid"), @@ -70,7 +70,13 @@ function PUT (where, what, cb) { if (ini.config.auth) { headers.authorization = 'Basic ' + ini.config.auth; } + log(sys.inspect(u), "registryPUT"); + log(u.port || (u.protocol === "https:" ? 443 : 80), "registryPUT port"); + var client = http.createClient(u.port || (u.protocol === "https:" ? 443 : 80), u.hostname); + if (u.protocol === "https:") { + client.setSecure("X509_PEM"); + } var request = client.request("PUT", u.pathname, headers); log(sys.inspect(headers), "registryPUT headers"); |