1
0
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:
Mikael Roos 2015-12-07 10:09:26 +01:00
parent 1dc04e7c53
commit 3271d165ff
2 changed files with 9 additions and 1 deletions

View File

@ -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) {

View File

@ -10,6 +10,9 @@
$version = "v0.7.8* (2015-12-06)";
// For CRemoteImage
define(CIMAGE_USER_AGENT, "CImage/$version");
/**