[BUGFIX] Requesting /index.phpa/ breaks Uri host parameter
If the request URI contains ``index.php`` and something afterwards
before a slash, that something is included in the host being
set on the request URI that's constructed.
Problem lies in the handling of URIs containing index.php,
where that part is automatically stripped off. However it
strips it off in a way that can cause this issue, when the
``parse_url()`` is called on a broken URI.
Releases: master, 2.2, 2.1, 2.0