title: node.js setEncoding issue
body: <p>If I run the code below with the "setEncoding" line uncommented, I receive the following error:</p>
  
  <p>/usr/local/test-server/test.js:78</p>
  
  <pre><code>res.setEncoding('utf8');
  
      ^
  </code></pre>
  
  <p>TypeError: Object # has no method 'setEncoding'</p>
  
  <p>Without that line, everything works as expected - except for browsers complaining about undeclared character encoding.</p>
  
  <p>Nothing in the docs, SO, the GitHub issues list, or extensive Googling have turned up anything useful. node.js version is the latest: 0.8.6</p>
  
  <pre><code>var https = require('https');
  var sslPrivateKey = fs.readFileSync('./pk.pem');
  var sslCert = fs.readFileSync('./cert.pem');
  var sslOpts = { key: sslPrivateKey, cert: sslCert };
  
  var server = https.createServer(sslOpts, function(req, res) {
  
      if ('GET' === req.method) {
  
          res.writeHead(200, {'Content-Type': 'text/plain','charset': 'utf8'});
          //res.setEncoding('utf8');
          res.write('You are here' + "\n");
          res.end();
  
      } 
  
  }
  
  server.listen(8080);
  </code></pre>