From 0ab0ff3b0c13fbbb0864a97976dceba002b07251 Mon Sep 17 00:00:00 2001 From: jim-p Date: Fri, 15 Nov 2013 10:23:04 -0500 Subject: 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) --- config/lightsquid/sqstat.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3