A little thing that tripped me up tonight -- some bits of middleware that didn't work right when trying to use the optional 2nd arg to serverResponse.writeHead().
In logger's case, it would assume it's a header; thus discarding the headers you were trying to set, and not providing useful info in the log output.
Fix logger's writeHead proxy dropping the optional reasonPhrase param
Don't stomp on response._headers, might have existing values
Fix more writeHead proxies dropping the optional reasonPhrase param
Store correct header param in Logger
interesting! I actually never noticed the phrase as a value, never seen it used :D kinda sucks because apply()ing all the time will slow things down a bit
It's handy when you need to send a 500 Oh God The Horror response ;-)
500 Oh God The Horror
I'll rewrite it with straight calls to writeHead() rather than apply -- In logger's case, we need to sniff the params anyway, so not a biggie
Avoid .apply, call writeHead directly
haha, http is silly. I will merge this right away
sorry for the delay. do you want to rebase and squash?