Homestyx hydra

R1:c07ec8fee642

Preserve nonstandard ports during 404 redirects which add "/" to the ends of URIs

Summary:
Fixes T12058. When the user visits `/maniphest`, for example, we redirect to `/maniphest/`.

Since this redirect is very low-level (at the Aphront level, below the Site level) we need to preserve the request Host rather than correct it to `PhabricatorEnv::getURI()` or similar -- the request may be hiting a different Site like a blog domain.

Currently, we do not preserve the port. Instead, preserve the port if it is…
Repository: R1 hydra
Commit Date: Jan 4 2017