I'm having problems with node.js being able to call a particular URL over 
SSL. I can curl the URL with no problems, so I think it must be an 
incompatibility between node.js and something on the remote host's network.

CURL:

curl https://oldbb.unmc.edu

(receives response)

Node.js:

var https = require('https');

var options = {
  hostname: 'oldbb.unmc.edu',
  port: 443,
  path: '/',
  method: 'GET',
  headers: { //Add headers used by curl
      Accept: '*/*',
      'User-Agent': 'curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 
OpenSSL/0.9.8r zlib/1.2.5'
  },
  agent: false //Tried with and without this, doesn't seem to matter
};

var req = https.request(options, function(res) {
  console.log("statusCode: ", res.statusCode);
  console.log("headers: ", res.headers);

  res.on('data', function(d) {
    process.stdout.write(d);
  });
});
req.end();

req.on('error', function(e) {
  console.error(e);
});


Running the node.js version just hangs. I've inspected the web requests 
from both curl and node and verified that they are sending the same headers.

Requesting the "http" version of the same URL does work with node. I feel 
like there's some incompatibility between node's SSL and the remote host's 
SSL (it is using IIS 7.5).

The same request also doesn't work using the request library, and I also 
tried the setting strictSSL: false with it.

Anyone have any ideas?

Thanks,

Chris

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to