senchalabs/connect — pull request #433 by bigeasy (2011-12-08 01:01:22+00:00)
Title: static.send should always call the optional callback when present.

I'm using connect middleware components with Streamline.js, which expects a callback to follow the Node.js conventions, and to always be called.

The optional callback to `static.send` is called when a file is streamed. In this case, the callback is called where the `next` method would not be called. This indicates that the intent is to allow the caller to use `connect.send` as a standard Node.js callback function.

However, there are other paths were the optional callback is not called and instead the `static.send` function returns. This is fine within the **connect** framework. It does not allow use in a program flow that is expecting a callback.