diff options
author | jim-p <jimp@pfsense.org> | 2013-11-15 10:23:04 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-11-15 10:23:52 -0500 |
commit | 0ab0ff3b0c13fbbb0864a97976dceba002b07251 (patch) | |
tree | 34c04907f8295d341d41868f9a6cfc4c3baee925 /config | |
parent | 8d91049ac5a4991f3b7717777f52c8711476a590 (diff) | |
download | pfsense-packages-0ab0ff3b0c13fbbb0864a97976dceba002b07251.tar.gz pfsense-packages-0ab0ff3b0c13fbbb0864a97976dceba002b07251.tar.bz2 pfsense-packages-0ab0ff3b0c13fbbb0864a97976dceba002b07251.zip |
Fix this so it doesn't falsely toss an error if the server returns a different, but still OK, result than expected (e.g. if using Squid 3)
Diffstat (limited to 'config')
-rw-r--r-- | config/lightsquid/sqstat.class.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/config/lightsquid/sqstat.class.php b/config/lightsquid/sqstat.class.php index 228aecfe..03695a47 100644 --- a/config/lightsquid/sqstat.class.php +++ b/config/lightsquid/sqstat.class.php @@ -179,7 +179,8 @@ class squidstat{ } fclose($this->fp); - if ($raw[0]!="HTTP/1.0 200 OK") { $this->errorMsg(1, "Cannot get data. Server answered: $raw[0]"); + if (!preg_match("/^HTTP.* 200 OK$/", $raw[0])) { + $this->errorMsg(1, "Cannot get data. Server answered: $raw[0]"); return false; } |