cloudhead/node-static — pull request #79 by guybedford (2012-12-06 15:32:54+00:00)
Title: Allow error handlers to entirely control response

In the example of an error handler given in the docs, the error handler is able to write the header and send a response.

I was creating an error handler of this form, but part of it needed to do an asynchronous operation.

The result was that suddenly node-static sends an empty response.

It took some time to track this down, and it would be a big help to get this in - it allows me to serve a streamed 404 page if the file doesn't exist.

If no error handler is attached, node-static can still close the connection though.