Enhance redirections and make them more resilient.
Enhance redirections and make them more resilient.

Currently, if headers have already been sent, a redirection will fail and generate errors in the error log. The user will be presented with a page containing a link that he or she will need to click on. Checking if headers have already been sent we can avoid errors, and adding a simple javascript to the "onload" event in the body of the page, we can still redirect automatically. That way, only when headers have already been sent and the users have javascript disabled, they will get to see the page.

dnmvisser/simplesamlphp,dnmvisser/simplesamlphp,jschlyter/simplesamlphp,jschlyter/simplesamlphp,simplesamlphp/simplesamlphp,ghalse/simplesamlphp,ghalse/simplesamlphp,simplesamlphp/simplesamlphp,sitya/simplesamlphp,dnmvisser/simplesamlphp,jschlyter/simplesamlphp,jschlyter/simplesamlphp,ghalse/simplesamlphp,ghalse/simplesamlphp,sitya/simplesamlphp,jschlyter/simplesamlphp,sitya/simplesamlphp,sitya/simplesamlphp,dnmvisser/simplesamlphp,simplesamlphp/simplesamlphp,simplesamlphp/simplesamlphp