Decompress fetched response data
This commit is contained in:
parent
311846b4c9
commit
3f65352c06
1 changed files with 9 additions and 0 deletions
|
|
@ -57,6 +57,15 @@ abstract class PatchBase {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
protected function fetch_gzip(string $url) : bool {
|
||||
$str = $this->curl($url);
|
||||
if ($str) {
|
||||
if (!($this->data = gzdecode($str)))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
protected function parse(string $re) : bool {
|
||||
if ($str = $this->regex_str($re)) {
|
||||
$this->patch->setVersion($str, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue