EDIT: as of express 4.x, you need to use res.headersSent. Note also that you may want to use setTimeout before checking, as it isn't set to true immediately following a call to res.send(). Source
Simple: Connect's Response class provides a public property "headerSent".
res.headerSent is a boolean value that indicates whether the headers have already been sent to the client.
From the source code:
/**
* Provide a public "header sent" flag
* until node does.
*
* @return {Boolean}
* @api public
*/
res.__defineGetter__('headerSent', function(){
return this._header;
});
Node supports the res.headersSent these days, so you could/should use that. It is a read-only boolean indicating whether the headers have already been sent.