strlen($prefix))? substr($URI,strlen($prefix)):'/'; $method = strtoupper($_SERVER['REQUEST_METHOD']); // PHP messages destroy XML output, so switch them off ini_set('display_errors', E_USER_NOTICE); //********************************* // BASIC CONNECTION HEADER //********************************* if ($logging>0) { error_log('DAV REQ'); error_log($method.'=>'.$path.' '.strftime('%c',time())); $request_hdrs = apache_request_headers(); unset($request_hdrs['Accept-Language']); // suppress junk $log = ''; foreach ($request_hdrs as $k=>$v) { $log .= $k.'='.$v.'--'; } error_log($log); } //********************************* // CONFIGURE SERVER INSTANCE //********************************* $P = new Depot_Filesystem; // instantiate server class $P->prefix = $prefix; $P->base = $base; $P->path = $path; $P->logging = $logging; $P->depot_host = $depot_host; $P->depot_port = $depot_port; $P->depot_agent = $depot_agent; $P->admin_user = $admin_user; // used for deleting faux directory placeholders $P->admin_passwd = $admin_passwd; //****************** // INVOKE SERVER //****************** $P->ServeRequest($method); flush(); // release any buffered output to client //********************************* // BASIC CONNECTION TRAILER //********************************* if ($logging>0) { error_log('DAV RESPONSE'); $response_hdrs = apache_response_headers(); $log = ''; foreach ($response_hdrs as $k=>$v) { $log .= $k.'='.$v.'--'; } error_log($log); } ?>