Fix for #458. Host header may cause some sites not to be proxyable with changeOrigin enabled #460

Closed
wants to merge 1 commit into from

2 participants

@janjongboom

RFC 2616 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.

/cc @nathan7

@indexzero
nodejitsu member

cherry-picked. Thanks.

@indexzero indexzero closed this Dec 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment