diff options
author | isaacs <i@izs.me> | 2010-03-26 03:21:10 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-03-26 03:21:10 +0300 |
commit | d7f1521b2bd241056bf0bfb9a71474211262f8be (patch) | |
tree | 5d81746318d6aad18b0d1f9a91b258e170b26953 | |
parent | e2c940e31eee487e8176e73c91259b4c29535022 (diff) |
Use http_old until http.js has https supportv0.0.6
-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"); |