Commit 4b96c67 causes Shibboleth login to fail (this is the first commit where this issue happens, identified using bisecting). Shibboleth receives a HTML post and then generates a HTML page with an onload action and/or a single submit button in a noscript block that redirects the request back to a calling web page.
Please revert that commit. Based on the commit description (and the separate commits that follow), I cannot see what problem it was trying to fix.