title: SimpleSamlPhp as SP redirects incorrectly
body: <p>I have a SimpleSamlPHP implementation working as a Service Provider, so the workflow is as follows:</p>
  
  <p>IdP sends assertion to my ACS URL: </p>
  
  <p>/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp</p>
  
  <p>but then it looks like he authenticates and gets redirected to</p>
  
  <p>/simplesaml/module.php/saml/sp/saml2-acs.php</p>
  
  <p>which throws an error, as there is no authsource (the /default-sp part) specified:</p>
  
  <pre><code>SimpleSAML_Error_Error: UNHANDLEDEXCEPTION
  Backtrace:
  0 *\simplesamlphp\www\module.php:180 (N/A)
  Caused by: SimpleSAML_Error_Exception: No authentication source with id false found.
      Backtrace:
      2 *\simplesamlphp\lib\SimpleSAML\Auth\Source.php:242 (SimpleSAML_Auth_Source::getById)
      1 *\simplesamlphp\modules\saml\www\sp\saml2-acs.php:8 (require)
      0 *\simplesamlphp\www\module.php:135 (N/A)
  </code></pre>
  
  <p>But, it also has a set of PHP errors output to page too:</p>
  
  <pre><code>Warning: array_key_exists(): The first argument should be either a string or an integer in *\simplesamlphp\lib\SimpleSAML\Configuration.php on line 314 
  Warning: Cannot modify header information - headers already sent by (output started at *\simplesamlphp\lib\SimpleSAML\Configuration.php:314) in *\simplesamlphp\lib\SimpleSAML\Error\Error.php on line 191 
  Warning: Cannot modify header information - headers already sent by (output started at *\simplesamlphp\lib\SimpleSAML\Configuration.php:314) in *\simplesamlphp\templates\includes\header.php on line 40
  </code></pre>
  
  <p>(I've taken out the directory path and replaced with * - it's not that normally)</p>
  
  <p>I can't work out if it's a bug with SimpleSamlPHP or if it's (far more likely) an incorrect setup. My authsources and metadata is as follows:</p>
  
  <p>saml20-idp-remote.php:</p>
  
  <pre><code>$metadata['https://app.onelogin.com/saml/metadata/391645'] = array(
      'name' =&gt; 'FSSO',
      'SingleSignOnService' =&gt; 'https://app.onelogin.com/trust/saml2/http-post/sso/391645',
      'AssertionConsumerservice' =&gt; 'https://www.fbjni.com/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp',
      'SingleLogoutService' =&gt; 'https://www.fbjni.com/simplesaml/module.php/saml/sp/saml2-logout.php/default-sp',
      'certData'          =&gt; '[rawCertificateData]'
  );
  </code></pre>
  
  <p>authsources.php:</p>
  
  <pre><code>'default-sp' =&gt; array(
      'saml:SP',
      'RelayState' =&gt; 'https://www.fbjni.com/',
      'entityID' =&gt; 'https://app.onelogin.com/saml/metadata/391645',
  ),
  </code></pre>