KenPowers/connect-static-transform — pull request #2 by 00Davo (2014-01-04 11:20:22+00:00)
Title: For a 200 successful response, set the headers implicitly

Using `res.setHeader()` instead of `res.writeHead()` means that other middleware are free to modify the headers as well if required. For example, the `express.compress()` middleware was unable to apply gzip to files from connect-static-transform since the headers were already sent; with this change made, `express.compress()` works fine alongside connect-static-transform middleware.

I left the headers set explicitly, with `res.writeHead()`, for error responses since those are less likely to need gzip or other middleware.

(Allowing gzipping on transformed files is kind of important, considering they'll often be JavaScript!)