No date response header in node.js 0.8

Problem

According to the documentation the Date response header should be sent by default.

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');

Curling the sample above I get:

C:\Users\Hans>curl localhost:1337 -i
HTTP/1.1 200 OK
Content-Type: text/plain
Connection: keep-alive
Transfer-Encoding: chunked

Hello World

No Date header. Even when I set response.sendDate = true I get no Date header. What is wrong?

Problem courtesy of: Hans Malherbe

Solution

Upgraded from 0.8.1 to 0.8.2 and now it works

C:\Users\Hans>curl localhost:1337 -i
HTTP/1.1 200 OK
Content-Type: text/plain
Date: Fri, 13 Jul 2012 10:52:59 GMT
Connection: keep-alive
Transfer-Encoding: chunked

Hello World
Solution courtesy of: Hans Malherbe

Discussion

There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.