gruntjs/grunt-contrib-livereload — pull request #26 by blai (2013-03-08 04:45:29+00:00)
Title: utils.livereloadSnippet should re-write Response.end() instead of Response.write()?

The utils.livereloadSnippet would not work for cases when Response.write() was called using `String` instead of `Buffer`. See node source https://github.com/joyent/node/blob/master/lib/http.js#L863 and https://github.com/joyent/node/blob/master/lib/http.js#L919. When end() is used to send out the final response, it sometimes use `this.connection.write` instead of `this.write()`.

I have not dig too deep into this, so I am not sure if this is the best way to do it. Maybe we need to check the [condition](https://github.com/joyent/node/blob/master/lib/http.js#L843) and re-write one of the two?