Commit d9645874 authored by Clemens John's avatar Clemens John

Merge branch 'gzip_node_data' into 'master'

Gzip node.data

Support gzip compressed (and also uncompressed) node.data files.

See merge request !1
parents 19a3e1a6 05fcf043
......@@ -72,9 +72,9 @@
//fetch crawl data from router
$return = array();
if($ip->getNetwork()->getIpv()==6)
$command = "curl -s --max-time $crawl_timeout -g http://[".$ip->getIp()."%25\$(cat /sys/class/net/$network_connection_ipv6_interface/ifindex)]/node.data";
$command = "curl -s --max-time $crawl_timeout -g http://[".$ip->getIp()."%25\$(cat /sys/class/net/$network_connection_ipv6_interface/ifindex)]/node.data | zcat -f";
elseif($ip->getNetwork()->getIpv()==4)
$command = "curl -s --max-time $crawl_timeout -g http://".$ip->getIp()."/node.data";
$command = "curl -s --max-time $crawl_timeout -g http://".$ip->getIp()."/node.data | zcat -f";
echo " ".$command."\n";
exec($command, $return);
$return_string = "";
......
......@@ -7,9 +7,9 @@
if($ip->fetch()) {
$return = array();
if($ip->getNetwork()->getIpv()==6)
$command = "curl -s --max-time 10 -g http://[".$ip->getIp()."%25\$(cat /sys/class/net/".ConfigLine::configByName("network_connection_ipv6_interface")."/ifindex)]/node.data";
$command = "curl -s --max-time 10 -g http://[".$ip->getIp()."%25\$(cat /sys/class/net/".ConfigLine::configByName("network_connection_ipv6_interface")."/ifindex)]/node.data | zcat -f";
elseif($ip->getNetwork()->getIpv()==4)
$command = "curl -s --max-time 10 -g http://".$ip->getIp()."/node.data";
$command = "curl -s --max-time 10 -g http://".$ip->getIp()."/node.data | zcat -f";
exec($command, $return);
$return_string = "";
foreach($return as $string) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment