bigeasy/connect — comment on commit 3bbd509b10106fa7b6d46c8ace4ebd7271ebe233
File:  line 0
By bigeasy:

Okay. I see where I may have broken Express `res.sendfile()`, even though I don't use Express. Instead of reporting a bad request or forbidden as an error for the error handler to handle, the current handler reports immediately. That is easy enough to fix sending the response and reporting no error. It seems inconsistent though, when there might be an error handler at the end of the chain.

The reasoning behind true is to indicate the this handler sent a response. There are three outcomes, an error is detected, a response is send or nothing. When I wrap this handler, it does not report its outcome. I suppose I could just as easily wrap the call and check the request object to see if headers were generated, but that seems like more of a hack that having the function itself report whether headers were sent.