aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-11-15 10:23:04 -0500
committerjim-p <jimp@pfsense.org>2013-11-15 10:23:52 -0500
commit0ab0ff3b0c13fbbb0864a97976dceba002b07251 (patch)
tree34c04907f8295d341d41868f9a6cfc4c3baee925
parent8d91049ac5a4991f3b7717777f52c8711476a590 (diff)
downloadpfsense-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)
-rw-r--r--config/lightsquid/sqstat.class.php3
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;
}