summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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)