• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/web/http/socket/handler.php
  • Класс: BitrixMainWebHttpSocketHandler
  • Вызов: Handler::sendBody
protected function sendBody(): bool
{
	$request = $this->request;
	$body = $request->getBody();

	if (!$body->eof() || $this->requestBodyPart !== '')
	{
		if (!$body->eof() && strlen($this->requestBodyPart) < self::BUF_BODY_LEN)
		{
			$part = $body->read(self::BUF_BODY_LEN);
			$this->requestBodyPart .= $part;
			$this->log($part, WebHttpDebug::REQUEST_BODY);
		}

		$result = $this->write($this->requestBodyPart, 'Error sending the message body.');

		$this->requestBodyPart = substr($this->requestBodyPart, $result);
	}

	return ($body->eof() && $this->requestBodyPart === '');
}