projectwonder/wonder — Issue #80: Bug in ERXRequest HOST_NAME_KEYS
Author: simon-clicktravel
Created: 2011-12-16 00:26:26+00:00
State: open

re this:

// 'Host' is the official HTTP 1.1 header for the host name in the request URL, so this should be checked first.
protected static final NSArray HOST_NAME_KEYS = new NSArray(new String[]{"Host", "x-forwarded-host", "x-webobjects-server-name", "server_name", "http_host"});

this is incorrect. x-forwarded-host should be checked first because if you are running behind a load balancer that is handling ssl decryption for you then ALL incoming requests are http. the above line of code causes infinite re-directs when trying to switch from https to http via an ERXRedirect in an app behind a load balancer where ssl is handed off.

simon