nodejitsu/node-http-proxy — pull request #544 by marmor (2014-01-07 00:31:20+00:00)
Title: Fix for Issue#543 (name-based virtual host target)

The "Host" header field that was created and sent by the proxy to the backends, was wrong, because it had been copied from the original headers that were received by the proxy.

This caused many problems; for example, when the backend web server served several websites on the same IP/port ("name-based virtual-host"), which is very common, a wrong Host header caused the request to fail or to bring the wrong site.

The patch overwrites the Host field by the real host/port of the backend.