nodejitsu/node-http-proxy — pull request #460 by janjongboom (2013-09-15 09:39:45+00:00)
Title: Fix for #458. Host header may cause some sites not to be proxyable with changeOrigin enabled

[RFC 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html) Section 14.23 specifies that the port argument in the Host header is optional if connecting to default port (80 on HTTP f.e.). At the moment we always add the port, but I've encountered a website (10 mio pageviews a day) running IIS 7 that doesn't accept this host header and wants one without the port specified. See http://www.funda.nl. At the moment node-http-proxy doesn't work with this site if changeOrigin is enabled. Chrome f.e. doesn't add the port if doing a request for HTTP on port 80.

I saw only integration tests, no unit tests who cover this code, that's why there aren't any attached.