title: node.js process.nextTick error
body: <p>I'm experiencing something strange with node.js:</p>
  
  <p>When I try and use an http client with only the following code:</p>
  
  <pre><code>require('http').get({host:'127.0.0.1',port:9000, path:'/'}, function(res){
      var data = '';
      res.setEncoding('utf8');
      res.on('data', function(chunk){
          data += chunk; 
      });
      res.on('end', function(){
          console.log(data);
      });
  });
  </code></pre>
  
  <p>An error is thrown:</p>
  
  <pre><code>node.js:116
          throw e; // process.nextTick error, or 'error' event on first tick
          ^ TypeError: Cannot call method 'emit' of undefined
      at Socket.&lt;anonymous&gt; (http.js:1174:9)
      at Socket.emit (events.js:42:17)
      at Array.&lt;anonymous&gt; (net.js:799:27)
      at EventEmitter._tickCallback (node.js:108:26)
  </code></pre>
  
  <p>When I browse to 127.0.0.1:9000 in my browser I get the desired webpage. Furthermore, in the web host logs I can see that there has been a successful connection (something that doesn't happen if I use, say, <code>localhost</code> instead of <code>127.0.0.1</code>. Just an aside).</p>
  
  <p>I say it's funny because if I change the host to google or whatnot everything works fine and it spits out the html to the console.</p>
  
  <p>I should note, I'm running node 0.4.2 under cygwin, built from source.</p>
  
  <p>Anyone seen/dealt with this before?</p>