mirror of
https://github.com/mosbth/cimage.git
synced 2025-08-13 11:34:22 +02:00
Strict mode only reporting 404 when failure, #127.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
$version = "v0.7.8* (2015-12-06)";
|
||||
$version = "v0.7.9 (2015-12-07)";
|
||||
|
||||
// For CRemoteImage
|
||||
define("CIMAGE_USER_AGENT", "CImage/$version");
|
||||
@@ -40,10 +40,14 @@ function errorPage($msg, $type = 500)
|
||||
|
||||
header("HTTP/1.0 $header");
|
||||
|
||||
if ($mode == 'development') {
|
||||
if ($mode == "development") {
|
||||
die("[img.php] $msg");
|
||||
}
|
||||
|
||||
if ($mode == "strict") {
|
||||
$header = "404 Not Found";
|
||||
}
|
||||
|
||||
error_log("[img.php] $msg");
|
||||
die("HTTP/1.0 $header");
|
||||
}
|
||||
|
@@ -13,8 +13,9 @@ return array(
|
||||
* Default values:
|
||||
* mode: 'production'
|
||||
*/
|
||||
//'mode' => 'production', // 'development', 'strict'
|
||||
//'mode' => 'development', // 'development', 'strict'
|
||||
//'mode' => 'production',
|
||||
//'mode' => 'development',
|
||||
//'mode' => 'strict',
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user