mirror of
https://github.com/mosbth/cimage.git
synced 2025-04-20 17:01:52 +02:00
Strict mode only reporting 404 when failure, #127.
This commit is contained in:
parent
c009f423a2
commit
0b2723feee
@ -46,14 +46,14 @@ There are several ways of installing. You either install the whole project which
|
||||
|
||||
The [sourcode is available on GitHub](https://github.com/mosbth/cimage). Clone, fork or [download as zip](https://github.com/mosbth/cimage/archive/master.zip).
|
||||
|
||||
**Latest stable version is v0.7.8 released 2015-12-06.**
|
||||
**Latest stable version is v0.7.9 released 2015-12-07.**
|
||||
|
||||
I prefer cloning like this. Do switch to the latest stable version.
|
||||
|
||||
```bash
|
||||
git clone git://github.com/mosbth/cimage.git
|
||||
cd cimage
|
||||
git checkout v0.7.8
|
||||
git checkout v0.7.9
|
||||
```
|
||||
|
||||
Make the cache-directory writable by the webserver.
|
||||
@ -76,7 +76,7 @@ There are some all-included bundles of `img.php` that can be downloaded and used
|
||||
Dowload the version of your choice like this.
|
||||
|
||||
```bash
|
||||
wget https://raw.githubusercontent.com/mosbth/cimage/v0.7.8/webroot/imgp.php
|
||||
wget https://raw.githubusercontent.com/mosbth/cimage/v0.7.9/webroot/imgp.php
|
||||
```
|
||||
|
||||
Open up the file in your editor and edit the array `$config`. Ensure that the paths to the image directory and the cache directory matches your environment, or create an own config-file for the script.
|
||||
|
@ -5,9 +5,10 @@ Revision history
|
||||
[](https://scrutinizer-ci.com/g/mosbth/cimage/build-status/master)
|
||||
|
||||
|
||||
v0.7.8* (2015-12-07)
|
||||
v0.7.9 (2015-12-07)
|
||||
-------------------------------------
|
||||
|
||||
* Strict mode only reporting 404 when failure, #127.
|
||||
* Added correct CImage version to remote agent string, #131.
|
||||
* Adding CCache to improve cache handling of caching for dummy, remote and srgb. #130.
|
||||
|
||||
|
@ -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',
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user