Docs don't mention that 'status' is a special parameter for res.render
I had been writing code like:
app.get('/', function(req, res){
res.render('index', {
status: 'Hey, this is my status!'
});
});
completely oblivious to the fact that, thanks to this line, res.render puts the contents of 'status' into the HTTP header when it's set, eg the above produces "HTTP/1.1 200 this is my status! unknown" instead of the legal "HTTP/1.1 200 OK'. As an example of the havoc this wreaks, it turns out that Heroku suppresses your app's outgoing traffic (without explicitly stating why) if it's not sending out legal 200 OKs.
Could you possibly update the docs to warn against naming a view parameter 'status'? Thanks!
wish js had macros we could also check for a non-number in development and warn based on that
Alternatively, do you think it might be worth rewriting view.js#L359 so that it looks for eg options.HTTPStatus instead of options.status? I understand that wouldn't be backwards-compatible with preexisting templates, but there's a case to be made for it - I imagine 'status' would be a very common variable name to put in a template, whereas HTTPStatus or whatever is very explicitly referring to the HTTP status.
Here's a pull request if you decide the above suggestion makes sense: #741