protected function httpReadHeaders()
    {
        while (($l = $this->readLine()) !== null) {
            if ($l === '') {
                return true;
            }
            $e = explode(': ', $l);
            if (isset($e[1])) {
                $this->currentHeader = 'HTTP_' . strtoupper(strtr($e[0], Generic::$htr));
                $this->server[$this->currentHeader] = $e[1];
            } elseif (($e[0][0] === "\t" || $e[0][0] === "\x20") && $this->currentHeader) {
                // multiline header continued
                $this->server[$this->currentHeader] .= $e[0];
            } else {
                // whatever client speaks is not HTTP anymore
                $this->badRequest();
                return false;
            }
        }
        return null;
    }