As per this support topic, the call header($name.': '.$value, false) by sendHeaders() function into the vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php file causes Error 500 into app.php generated pages; a solution to this issue is to set to true the second argument.
It seems that this function generates a new header Content-Type along some other Content-Type already generated, thus breaking HTTP standard hence triggering the error.
Unfortunately, the vendor folder doesn't seem to be up into the repository; moreover, I don't even know what other collateral effects the change of that call may trigger, so I cannot submit a patch to this issue.
Moreover, since I have no clue about the changes to this file from 3.1.7-PL1 to 3.1.8.RC1, I have to mark this bug affecting latter version as well.