private function readChunked(): string
    {
        $readLength = 0;
        $chunksize  = null;
        $extension  = null;
        $body       = '';
        sscanf($this->socket->readLine(), '%x%s', $chunksize, $extension);
        while (0 < $chunksize) {
            $data        = $this->socket->read($chunksize + 4);
            $body       .= rtrim($data);
            $readLength += $chunksize;
            sscanf($this->socket->readLine(), '%x', $chunksize);
        }

        $this->headers->put('Content-Length', $readLength);
        $this->headers->remove('Transfer-Encoding');
        return $body;
    }