Permalink
Browse files

Closes GH-727 A bit of debugging and workaround.

  • Loading branch information...
1 parent b02eb3f commit dc6897a3e6e978be28fd4f0a0edd9c2ab6da7770 @isaacs isaacs committed Mar 20, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/utils/registry/request.js
@@ -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

0 comments on commit dc6897a

Please sign in to comment.