hughsk/glslify-live — pull request #2 by robert-chiniquy (2014-10-19 16:55:24+00:00)
Title: Check res.headersSent before calling res.setHeader() in bail()

I noticed sometimes `bail()` would be called after headers had already been written on the response. In this case, instead of writing the error back on the response, it throws and kills the server process.

This fix just doesn't set `text/plain` if headers have already been written, so the error is written to the request and the server can serve subsequent requests.