Fixing location header rewriting to appease servers like Jenkins.