Пример #1
0
    		"Microsoft Office Existence Discovery",
    		"Microsoft-WebDAV-MiniRedir/6.1.7600",
    		"Microsoft Office Core Storage Infrastructure/1.0",
    
    		);
    */
}
if (__webdav_is_dav_headers() && $bNeedInclude) {
    if (CModule::includeModule('ldap') && CLdapUtil::isBitrixVMAuthSupported()) {
        CLdapUtil::bitrixVMAuthorize();
    }
    if (!$_SERVER['PHP_AUTH_USER'] || !$_SERVER['PHP_AUTH_USER']) {
        $res = !empty($_SERVER['REDIRECT_REMOTE_USER']) ? $_SERVER['REDIRECT_REMOTE_USER'] : $_SERVER['REMOTE_USER'];
        if (!empty($res) && preg_match('/(?<=(basic\\s))(.*)$/is', $res, $matches)) {
            $res = trim($matches[0]);
            list($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"]) = explode(':', base64_decode($res));
        }
    }
    if (!is_array($GLOBALS["APPLICATION"]->arComponentMatch)) {
        $GLOBALS["APPLICATION"]->arComponentMatch = array();
    }
    $GLOBALS["APPLICATION"]->arComponentMatch[] = 'webdav';
    $GLOBALS["APPLICATION"]->arComponentMatch[] = 'socialnetwork';
    define("STOP_STATISTICS", true);
    define("NO_AGENT_STATISTIC", "Y");
    define("NO_AGENT_CHECK", true);
    $GLOBALS["APPLICATION"]->ShowPanel = false;
    if (CModule::IncludeModule("webdav")) {
        CWebDavBase::OnBeforeProlog();
    }
}