• Модуль: dav
  • Путь к файлу: ~/bitrix/modules/dav/classes/general/exchangeclient.php
  • Класс: CDavExchangeClient
  • Вызов: CDavExchangeClient::Send
public function Send($request)
{
	if ($this->debug)
	{
		$f = fopen($_SERVER["DOCUMENT_ROOT"]."/++++++++.+++", "a");
		fwrite($f, "n>>>>>>>>>>>>>>>>>> REQUEST >>>>>>>>>>>>>>>>n".$request->ToString()."n<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 3)
			break;

		$this->SendRequest($request);
		$response = $this->GetResponse();

		if (!is_null($response))
		{
			if (($location = $response->GetHeader('Location')) && !is_null($location))
			{
				if ($this->proxyUsed)
					$request->SetPath($this->scheme."://".$this->server.((intval($this->port) > 0) ? ":".$this->port : "").$location);
				else
					$request->SetPath($location);

				continue;
			}
			elseif (($statusCode = $response->GetStatus('code')) && (intval($statusCode) == 401))
			{
				$request = $this->Authenticate($request, $response);
				if (is_null($request))
				{
					$this->AddError("SS1", "Unsupported authentication method (supported: basic, digest)");
					return null;
				}
				continue;
			}
		}

		break;
	}

	if ($this->debug)
	{
		$f = fopen($_SERVER["DOCUMENT_ROOT"]."/++++++++.+++", "a");
		fwrite($f, "n>>>>>>>>>>>>>>>>>> RESPONSE >>>>>>>>>>>>>>>>n");
		if (is_null($response))
			fwrite($f, "NULL");
		else
			fwrite($f, $response->Dump());
		fwrite($f, "n<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<