title: Node.js Https request Error
body: <p>I've tried <a href="//nodejs.org/api/https.html#https_https_request_options_callback" rel="noreferrer">the sample from the documentation</a> and it works great.</p>
  
  <p>But when I change the URL to <code>https://api.mercadolibre.com/sites/</code>, the request hangs. The only thing I get is:</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>{ [Error: socket hang up] code: 'ECONNRESET' }
  </code></pre>
  
  <p>Here's my code:</p>
  
  <pre class="lang-js prettyprint-override"><code>var https = require('https');
  
  this.dispatch = function(req, res) {
    var renderHtml = function(content) {
      res.writeHead(200, {'Content-Type': 'text/html'});
      res.end(content, 'utf-8');
    }
  
    var parts = req.url.split('/');
  
    var options = {
      host: 'api.mercadolibre.com',
      port: 443,
      path: '/sites/',
      method: 'GET'
    };
  
    var request = https.request(options, function(res) {
      console.log("statusCode: ", res.statusCode);
      console.log("headers: ", res.headers);
  
      res.on('data', function(d) {
        process.stdout.write(d);
      });
    });
  
    request.on('error', function(e) {
      console.error('error');
      console.error(e);
    });
  
    request.end();
    return 'item id:' + parts[2];
  };
  </code></pre>
  
  <p>I've tried with curl, soapui and with a browser. On all cases works great, but with node.js it doesn't.</p>
  
  <p>How can I get more data on what's going on?</p>
  
  <p><em>added</em></p>
  
  <p>With curl i do: curl --sslv3 <a href="https://api.mercadolibre.com/sites/" rel="noreferrer">https://api.mercadolibre.com/sites/</a> works.
  I've test same in centos 6 and works too.
  I've reinstalled node, this time from source, same problem. My Os is ubuntu 12.04. 
  Thanks.</p>