• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/web/http/curl/handler.php
  • Класс: Bitrix\Main\Web\Http\Curl\Handler
  • Вызов: Handler::receiveHeaders
public function receiveHeaders($handle, $data)
{
	if ($data === "\r\n")
	{
		// got all headers
		$this->log("\n<<responseHeaders . "\n", HttpDebug::RESPONSE_HEADERS);

		// build the response for the next stage
		$this->response = $this->responseBuilder->createFromString($this->responseHeaders);

		$fetchBody = $this->waitResponse;

		if ($this->shouldFetchBody !== null)
		{
			$fetchBody = call_user_func($this->shouldFetchBody, $this->response, $this->request);
		}

		if (!$fetchBody)
		{
			// this is not an error really
			throw new SkipBodyException();
		}
	}
	else
	{
		$this->responseHeaders .= $data;
	}
	return strlen($data);
}