Reverse Proxy port rewriting for HTTP3xx Location headers
Created by: jayv
When receiving HTTP3xx server side redirects, the Location header is not entirely rewritten by the proxy, except for rewriting http to https, but in fact servername and port should be translated as well if they match the backend server and port, to make the process transparent to the browser.
So if the Location header contains http://backendhostname:backendport/foo/bar it should be rewritten to http://proxyhost:proxyport/foo/bar while still applying the http to https conversion as currently implemented.