httpBuffer)) { $context->httpBuffer = ''; } $context->httpBuffer .= $data; if (strlen($context->httpBuffer) > (int)$this->maxSize) { throw new \OverflowException("Maximum buffer size of {$this->maxSize} exceeded parsing HTTP header"); } if ($this->isEom($context->httpBuffer)) { $request = RequestFactory::getInstance()->fromMessage($context->httpBuffer); unset($context->httpBuffer); return $request; } } /** * Determine if the message has been buffered as per the HTTP specification * @param string $message * @return boolean */ public function isEom($message) { return (boolean)strpos($message, static::EOM); } }