Fix for issue #318 Reverse Proxy port rewriting for HTTP3xx Location headers

This is a fix with tests that should solve issue #318 Reverse Proxy port rewriting for HTTP3xx Location headers.