diff options
| author | Paul Buetow (lxpbuetow.webde.local) <paul.buetow@1und1.de> | 2014-07-14 15:37:40 +0200 |
|---|---|---|
| committer | Paul Buetow (lxpbuetow.webde.local) <paul.buetow@1und1.de> | 2014-07-14 15:37:40 +0200 |
| commit | bbeeaee8344bca82f449be645270a5bd00f9c7cf (patch) | |
| tree | 985a66bd7b27a5b4e6e6334673908518ea77d3d3 | |
| parent | 280621e97ed7de337baaff04d20e6049ac913e1b (diff) | |
add ipv6 support to get curl
| -rwxr-xr-x | src/fapi | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -491,14 +491,17 @@ class Fapi(FapiBase): if protocol == 'PROTOCOL_TCP': port = str(destination['port']) ip = destination['address'].split('/')[-1] + if re.match('.*:.*', ip): ip = "'[" + ip + "]'" ipport = ip + ':' + port - failtouch = ' || touch ' + ipport + '.failed' headerdump = ' -D ' + ipport + '.header' + redirect = ' >' + ipport + '.out' + ' 2>' + ipport + '.err' + failtouch = ' || touch ' + ipport + '.failed' + postcmd = ipport + redirect + failtouch m = re.match('.*43$', port) if m: - return 'curl -m 3' + headerdump + ' -k https://' + ipport + failtouch + return 'curl -g -m 3' + headerdump + ' -k https://' + postcmd else: - return 'curl -m 3' + headerdump + ' http://' + ipport + failtouch + return 'curl -g -m 3' + headerdump + ' http://' + postcmd else: return '# ' + protocol + ': Can only curl PROTOCOL_TCP. Address: ' + destination['address'] return lambda: curl(f5) |
