1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-15 10:34:02 +02:00

A couple improvements

Show 400 if request is missing spec (instead of redirect)
Allow config.php to change factories for Minify and MinApp objects
These should've been separate commits, :(
This commit is contained in:
Steve Clay
2015-09-29 14:35:43 -04:00
parent 1aaf8f014f
commit b7b26e3a83
3 changed files with 65 additions and 36 deletions

View File

@@ -426,11 +426,16 @@ class Minify {
}
/**
* @param string $header
* Show an error page
*
* @param string $url
* @param string $header E.g. 'HTTP/1.0 500 Internal Server Error'
* @param string $url URL to direct the user to
*
* @return void
* @internal This is not part of the public API and is subject to change
* @access private
*/
protected function errorExit($header, $url)
public function errorExit($header, $url)
{
$url = htmlspecialchars($url, ENT_QUOTES);
list(,$h1) = explode(' ', $header, 2);