wiki.techinc.nl/tests/phpunit/includes/api/format
Tim Starling f6d582a91e Avoid a redirect loop when the request URL is not normalized
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
2018-07-16 15:55:59 +10:00
..
ApiFormatBaseTest.php Avoid a redirect loop when the request URL is not normalized 2018-07-16 15:55:59 +10:00
ApiFormatJsonTest.php
ApiFormatNoneTest.php
ApiFormatPhpTest.php Convert OutputHandler functions to a class 2018-03-20 21:11:32 -07:00
ApiFormatRawTest.php Use ::class to resolve class names in tests 2018-01-26 22:49:13 +01:00
ApiFormatTestBase.php Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient 2018-05-30 18:06:13 -07:00
ApiFormatXmlTest.php Xml.php: Do not escape double quotes in $contents of Xml::element() 2018-05-23 20:03:54 +00:00