collectiveip/prerender — pull request #27 by tylr (2013-11-05 21:42:00+00:00)
Title: Properly support non 2xx response codes

Hi, it become necessary for us to return the proper response codes. We inject json objects into pages of our ember app so we do not need to make subsequent AJX requests. Because of this we can 30x, 404, 5xx during the server request.

Anyway, I needed proper support to send back the right response codes. I also monkey patched the prerender_rails to support this but I still need to work on making that more robust.

Feel free to review the code and make comments. Node.js is not my thing, but from what I gather this is the cleanest way to detect and intercept requests that need to be handled differently than 2xx.