From fc607f18b2cfe99e9e8fa2c11dec3cc0bf0165f6 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 24 Feb 2018 19:51:55 +0000 Subject: [PATCH] Fixed chunked transfer encoding --- src/danog/MadelineProto/Connection.php | 4 ++-- src/danog/MadelineProto/Tools.php | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/danog/MadelineProto/Connection.php b/src/danog/MadelineProto/Connection.php index 5444ae10..0e8aa753 100644 --- a/src/danog/MadelineProto/Connection.php +++ b/src/danog/MadelineProto/Connection.php @@ -411,9 +411,9 @@ class Connection $read = $this->read((int) $headers['content-length']); } elseif (isset($headers['transfer-encoding']) && $headers['transfer-encoding'] === 'chunked') { do { - $length = hexdec($this->read_http_line($res)); + $length = hexdec($this->read_http_line()); $read .= $this->read($length); - $this->read_http_line($res); + $this->read_http_line(); } while ($length); } diff --git a/src/danog/MadelineProto/Tools.php b/src/danog/MadelineProto/Tools.php index 7146b5db..ccd78359 100644 --- a/src/danog/MadelineProto/Tools.php +++ b/src/danog/MadelineProto/Tools.php @@ -1,5 +1,4 @@