title: Why isn't the https.request callback called?
body: <p>I have some node.js code where I'm trying to get package.info from raw.github.com. I'm doing a HTTPS request, but for some reason it looks like the callback is never called, because 'here' is never outputted.</p>
  
  <p>Does anyone see what's going wrong?</p>
  
  <pre><code>console.log(options)
  
  req = https.request(options, function(res) {
    console.log('here')
    res.setEncoding('utf8')
    // ... more code here
   })
  
   console.log(req)
  
   // .. return -&gt; listening and waiting
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>{ host: 'raw.github.com',
    port: 443,
    path: '/jasny/bootstrap/2.2.2-j3-wip/package.json',
    method: 'GET' }
  { domain: null,
    _events:
     { response: { [Function: g] listener: [Function] },
       socket: { [Function: g] listener: [Function] } },
    _maxListeners: 10,
    output: [],
    outputEncodings: [],
    writable: true,
    _last: false,
    chunkedEncoding: false,
    shouldKeepAlive: true,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _hasBody: true,
    _trailer: '',
    finished: false,
    agent:
     { domain: null,
       _events: { free: [Function] },
       _maxListeners: 10,
       options: {},
       requests: {},
       sockets: { 'raw.github.com:443': [Object] },
       maxSockets: 5,
       createConnection: [Function: createConnection] },
    socketPath: undefined,
    method: 'GET',
    path: '/jasny/bootstrap/2.2.2-j3-wip/package.json',
    _headers: { host: 'raw.github.com' },
    _headerNames: { host: 'Host' }
  }
  </code></pre>
  
  <p>For the full code see <a href="https://github.com/jasny/bootstrap-server/blob/wip/lib/packageinfo.js" rel="nofollow">lib/packageinfo.js</a>. The function is called in <a href="https://github.com/jasny/bootstrap-server/blob/wip/index.js" rel="nofollow">index.js</a></p>