Fixed chunked transfer encoding

This commit is contained in:
Daniil Gentili 2018-02-24 19:51:55 +00:00
parent ed6a7f6e06
commit fc607f18b2
2 changed files with 2 additions and 3 deletions

View File

@ -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);
}

View File

@ -1,5 +1,4 @@
<?php
/*
Copyright 2016-2018 Daniil Gentili
(https://daniil.it)