mirror of
https://github.com/mosbth/cimage.git
synced 2025-01-17 02:58:15 +01:00
add correct version to remote headers, fix #131
This commit is contained in:
parent
1dc04e7c53
commit
3271d165ff
@ -147,7 +147,12 @@ class CRemoteImage
|
||||
*/
|
||||
public function setHeaderFields()
|
||||
{
|
||||
$this->http->setHeader("User-Agent", "CImage/0.7.2 (PHP/". phpversion() . " cURL)");
|
||||
$cimageVersion = "CImage";
|
||||
if (defined("CIMAGE_USER_AGENT")) {
|
||||
$cimageVersion = CIMAGE_USER_AGENT;
|
||||
}
|
||||
|
||||
$this->http->setHeader("User-Agent", "$cimageVersion (PHP/". phpversion() . " cURL)");
|
||||
$this->http->setHeader("Accept", "image/jpeg,image/png,image/gif");
|
||||
|
||||
if ($this->useCache) {
|
||||
|
@ -10,6 +10,9 @@
|
||||
|
||||
$version = "v0.7.8* (2015-12-06)";
|
||||
|
||||
// For CRemoteImage
|
||||
define(CIMAGE_USER_AGENT, "CImage/$version");
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user