hget: handle http contentencoding (compression)

This commit is contained in:
cinap_lenrek 2013-10-12 02:22:57 +02:00
parent 0460e4be7d
commit ab7fe19ae2

View file

@ -81,6 +81,15 @@ if(! ~ $s 0)
exec cat >>$o
exec cat >$o
}
c=`{cat $d/contentencoding >[2]/dev/null}
switch($c){
case *gzip*
exec gunzip
case *bzip2*
exec bunzip2
case *compress*
exec uncompress
}
exec cat
}
}