Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
Closes GH-727 A bit of debugging and workaround.
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Mar 20, 2011
1 parent b02eb3f commit dc6897a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/utils/registry/request.js
Expand Up @@ -87,15 +87,20 @@ function request (method, where, what, etag, nofollow, cb_) {
log.verbose(etag, "etag")
headers[method === "GET" ? "if-none-match" : "if-match"] = etag
}

log.silly(headers, "headers")
log.silly(remote, "remote")

if (!remote.protocol) log.warn(remote, "No protocol?")

var opts = { method: method
, headers: headers
, path: (remote.pathname||"/")
+ (remote.search||"")
+ (remote.hash||"")
, host: remote.hostname
, secure: remote.protocol.toLowerCase() === "https:"
, secure: remote.protocol
&& remote.protocol.toLowerCase() === "https:"
, port: remote.port
}
if (!opts.port) opts.port = opts.secure ? 443 : 80
Expand Down

0 comments on commit dc6897a

Please sign in to comment.