If the request URL was not normalized, for example having a double slash in it, this could cause it to fail to match in the PathRouter. But the canonicalizing redirect was using the normalized URL, causing a redirect loop exception. So: * If the PathRouter fails to match with the original URL, try matching against the normalized URL. This allows it to still work for normalized URLs with a double slash in the title part of the path. * Have WebRequest::getFullRequestURL() always return the URL without removing dot segments or interpreting double slashes. Just append the path to the server. * Make MediaWikiTest.php use WebRequest instead of FauxRequest, allowing it to reproduce the exception in question. Add relevant test. * Add tests for the new PathRouter behaviour. Bug: T100782 Change-Id: Ic0f3a0060904abc364f75dae920480b81175d52f |
||
|---|---|---|
| .. | ||
| ApiFormatBaseTest.php | ||
| ApiFormatJsonTest.php | ||
| ApiFormatNoneTest.php | ||
| ApiFormatPhpTest.php | ||
| ApiFormatRawTest.php | ||
| ApiFormatTestBase.php | ||
| ApiFormatXmlTest.php | ||