[interchange] Update routine to recognize "RobotUAFinal"

David Christensen interchange-cvs at icdevgroup.org
Tue Jan 17 22:18:56 UTC 2017


commit 12928a38c9a2ab53384f5f48130401dd8b3348f7
Author: David Christensen <david at endpoint.com>
Date:   Tue Jan 17 16:17:26 2017 -0600

    Update routine to recognize "RobotUAFinal"

 lib/Vend/Server.pm |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)
---
diff --git a/lib/Vend/Server.pm b/lib/Vend/Server.pm
index a03248d..a7eb80b 100644
--- a/lib/Vend/Server.pm
+++ b/lib/Vend/Server.pm
@@ -286,7 +286,7 @@ EOF
 
 
 sub check_is_robot {
-    my $ret = 1;
+	my $ret = 1;
 
 #::logDebug("Check robot UA=$Global::RobotUA IP=$Global::RobotIP");
 	if ($Global::RobotIP and $CGI::remote_addr =~ $Global::RobotIP) {
@@ -303,13 +303,18 @@ sub check_is_robot {
 			$ret = 1;
 		}
 	}
-	unless ($Vend::Robot) { 
-		if ($Global::NotRobotUA and $CGI::useragent =~ $Global::NotRobotUA) {
-			# do nothing
-		}
-		elsif ($Global::RobotUA and $CGI::useragent =~ $Global::RobotUA) {
-#::logDebug("It is a robot by UA!");
-			$ret = 1;
+	if ($Global::RobotUAFinal and $CGI::useragent =~ $Global::RobotUAFinal) {
+		$ret = 1;
+	}
+	else {
+		unless ($Vend::Robot) {
+			if ($Global::NotRobotUA and $CGI::useragent =~ $Global::NotRobotUA) {
+				# do nothing
+			}
+			elsif ($Global::RobotUA and $CGI::useragent =~ $Global::RobotUA) {
+	#::logDebug("It is a robot by UA!");
+				$ret = 1;
+			}
 		}
 	}
 	return $ret;



More information about the interchange-cvs mailing list