Updated to 5.7.4.2: infinite redirect-to-self on every page

Permalink
I updated a C5-site from 5.7.3.1 to 5.7.4.2. Now every page (except the home page and 404 handler) causes an infinite redirect loop as every page tries to 301-redirect to itself. The server is running nginx with the following config:
location / {
  if (!-e $request_filename) {
    rewrite  ^(.*)$  /index.php?/$1 last;
    break;
  }
}

The same config worked perfectly with 5.7.3.1. How to fix this problem?

 
MathijsVos replied on at Permalink Reply
Everything is accessible again when I comment this section in concrete/src/Application/Application.php, lines 291-297:
if ($request->getPathInfo() != '/') {
    if (urldecode((string) $url) != urldecode($request->getUri())) {
        $response = new RedirectResponse((string) $url, 301);
        $response->setRequest($request);
        return $response;
    }
}

Seems like a bug to me.

Edit: reported as a bug.
https://www.concrete5.org/developers/bugs/5-7-4-2/infinite-301-redir...