From c25593235f3bd4bc524e4e74594845eeb0e95e80 Mon Sep 17 00:00:00 2001 From: Craig Armstrong Date: Tue, 19 Oct 2021 15:44:36 +0200 Subject: [PATCH] Modified URL_PATH Handling for scenarios when socket is open to a reverse proxy and needs a full URI Path to present the requested page. Case study with Zscaler tunnel monitoring : https://help.zscaler.com/zia/best-practices-deploying-gre-tunnels --- TCPCheck.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/TCPCheck.py b/TCPCheck.py index ec63ecb..9504c12 100755 --- a/TCPCheck.py +++ b/TCPCheck.py @@ -451,6 +451,14 @@ def web_check(self): if re.findall('^/', self.agentMgr.agent_option("URLPATH")): # This means we have a preceeding / FINALPATH="%s" % self.agentMgr.agent_option("URLPATH") + # Check if the URL Path is a full HTTP URI + elif re.findall('^http://', self.agentMgr.agent_option("URLPATH")): + # This means we have a preceeding http:// + FINALPATH = "%s" % self.agentMgr.agent_option("URLPATH") + # Check if the URL Path is a full HTTPS URI + elif re.findall('^https://', self.agentMgr.agent_option("URLPATH")): + # This means we have a preceeding https:// + FINALPATH = "%s" % self.agentMgr.agent_option("URLPATH") else: FINALPATH="/%s" % self.agentMgr.agent_option("URLPATH") else: