* Keep original letter case of response header keys
* Support node older than v0.11.6
messege.rawHeaders was added in v0.11.6
* Extract duplicated logic to method
* Fix for Reason-Phrase being overwritten on proxy response.
Calling res.writeHead has the side effect of defaulting the Reason-Phrase to default ones. I'm using Reason-Phrase codes to sub-route api responses and they were all being reset. This change only sets the statusMessage (Reason-Phrase) if it exists on the proxyRes and is successfully passing it through in my tests.
* Fixed spaces and bracket formatting.
if functioning as a reverse proxy for host1.foo.com,
with a backend target of backend.foo.com:8080, the
node proxy should only rewrite the redirect if it is
a redirect to somewhere on backend.foo.com:8080
auto host rewriting allows rewriting to work as expected in most
cases without extra cumbersome configuration
protocol rewriting allows node-http-proxy to be able to listen
over HTTPS and properly reverse-proxy to sites running over HTTP
(to avoid doing SSL twice)