summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Buetow (lxpbuetow.webde.local) <paul.buetow@1und1.de>2014-07-14 15:47:03 +0200
committerPaul Buetow (lxpbuetow.webde.local) <paul.buetow@1und1.de>2014-07-14 15:47:03 +0200
commit635fa4094b993cadc1ffc11b99a30e2675be5e5c (patch)
treec59dc4cbec3b385e62eec397dfe8301701cb3b79 /src
parentbbeeaee8344bca82f449be645270a5bd00f9c7cf (diff)
onldy do http or https
Diffstat (limited to 'src')
-rwxr-xr-xsrc/fapi7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fapi b/src/fapi
index 8558890..5d3db15 100755
--- a/src/fapi
+++ b/src/fapi
@@ -497,11 +497,12 @@ class Fapi(FapiBase):
redirect = ' >' + ipport + '.out' + ' 2>' + ipport + '.err'
failtouch = ' || touch ' + ipport + '.failed'
postcmd = ipport + redirect + failtouch
- m = re.match('.*43$', port)
- if m:
+ if re.match('.*43$', port):
return 'curl -g -m 3' + headerdump + ' -k https://' + postcmd
- else:
+ elif re.match('.*80$', port):
return 'curl -g -m 3' + headerdump + ' http://' + postcmd
+ else:
+ return '# ' + port + ': Can only curl HTTP or HTTPs. Address: ' + destination['address']
else:
return '# ' + protocol + ': Can only curl PROTOCOL_TCP. Address: ' + destination['address']
return lambda: curl(f5)