ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Public Member Functions | |
serveRequest () | |
Serve WebDAV HTTP request. More... | |
http_OPTIONS () | |
GET implementation. More... | |
http_PROPFIND () | |
PROPFIND method handler. More... | |
http_PROPPATCH () | |
PROPPATCH method handler. More... | |
http_MKCOL () | |
MKCOL method handler. More... | |
http_GET () | |
GET method handler. More... | |
_get_ranges (&$options) | |
parse HTTP Range: header More... | |
_multipart_byterange_header ($mimetype=false, $from=false, $to=false, $total=false) | |
generate separator headers for multipart response More... | |
http_HEAD () | |
HEAD method handler. More... | |
http_PUT () | |
PUT method handler. More... | |
http_DELETE () | |
DELETE method handler. More... | |
http_COPY () | |
COPY method handler. More... | |
http_MOVE () | |
MOVE method handler. More... | |
http_LOCK () | |
LOCK method handler. More... | |
http_UNLOCK () | |
UNLOCK method handler. More... | |
_copymove ($what) | |
_allow () | |
check for implemented HTTP methods More... | |
mkprop () | |
helper for property element creation More... | |
_check_auth () | |
check authentication if check is implemented More... | |
_new_uuid () | |
generate Unique Universal IDentifier for lock token More... | |
_new_locktoken () | |
create a new opaque lock token as defined in RFC2518 More... | |
_if_header_lexer ($string, &$pos) | |
_if_header_parser ($str) | |
parse If: header More... | |
_check_if_header_conditions () | |
check if conditions from "If:" headers are meat More... | |
_check_uri_condition ($uri, $condition) | |
Check a single URI condition parsed from an if-header. More... | |
_check_lock_status ($path, $exclusive_only=false) | |
lockdiscovery ($path) | |
Generate lockdiscovery reply from checklock() result. More... | |
http_status ($status) | |
set HTTP return status and mirror it in a private header More... | |
_urlencode ($url) | |
private minimalistic version of PHP urlencode() More... | |
_urldecode ($path) | |
private version of PHP urldecode More... | |
_prop_encode ($text) | |
UTF-8 encode property values if not already done so. More... | |
_slashify ($path) | |
Slashify - make sure path ends in a slash. More... | |
Data Fields | |
$uri | |
$base_uri | |
$path | |
$http_auth_realm = "PHP WebDAV" | |
$dav_powered_by = "" | |
$_if_header_uris = array() | |
$_http_status = "200 OK" | |
$_prop_encoding = "utf-8" | |
Private Member Functions | |
__construct () | |
Constructor. More... | |
writelog ($message) | |
Writes a message to the logfile.,. More... | |
Definition at line 37 of file Server.php.
|
private |
HTTP_WebDAV_Server::_allow | ( | ) |
check for implemented HTTP methods
void |
Definition at line 1530 of file Server.php.
References array.
Referenced by http_OPTIONS(), and serveRequest().
HTTP_WebDAV_Server::_check_auth | ( | ) |
check authentication if check is implemented
void |
Definition at line 1593 of file Server.php.
References $_SERVER.
Referenced by serveRequest().
HTTP_WebDAV_Server::_check_if_header_conditions | ( | ) |
check if conditions from "If:" headers are meat
the "If:" header is an extension to HTTP/1.1 defined in RFC 2518 section 9.4
void |
Definition at line 1810 of file Server.php.
References $_SERVER, $state, $uri, _check_uri_condition(), and _if_header_parser().
Referenced by serveRequest().
HTTP_WebDAV_Server::_check_lock_status | ( | $path, | |
$exclusive_only = false |
|||
) |
string | path of resource to check |
bool | exclusive lock? |
Definition at line 1871 of file Server.php.
References $_SERVER, and $path.
Referenced by _copymove(), http_DELETE(), http_LOCK(), http_MOVE(), http_PROPPATCH(), and http_PUT().
HTTP_WebDAV_Server::_check_uri_condition | ( | $uri, | |
$condition | |||
) |
Check a single URI condition parsed from an if-header.
Check a single URI condition parsed from an if-header
string | $uri | URI to check |
string | $condition | Condition to check for this URI |
Definition at line 1857 of file Server.php.
Referenced by _check_if_header_conditions().
HTTP_WebDAV_Server::_copymove | ( | $what | ) |
Definition at line 1464 of file Server.php.
References $_SERVER, $options, $path, _check_lock_status(), _urldecode(), array, and http_status().
Referenced by http_COPY(), and http_MOVE().
HTTP_WebDAV_Server::_get_ranges | ( | & | $options | ) |
parse HTTP Range: header
array | options array to store result in |
Definition at line 996 of file Server.php.
References $_SERVER, $end, $options, and array.
Referenced by http_GET().
HTTP_WebDAV_Server::_if_header_lexer | ( | $string, | |
& | $pos | ||
) |
string | header string to parse |
int | current parsing position |
Definition at line 1671 of file Server.php.
References $type, $uri, and array.
Referenced by _if_header_parser().
HTTP_WebDAV_Server::_if_header_parser | ( | $str | ) |
parse If: header
string | header string |
Definition at line 1725 of file Server.php.
References $list, $uri, _if_header_lexer(), and array.
Referenced by _check_if_header_conditions().
HTTP_WebDAV_Server::_multipart_byterange_header | ( | $mimetype = false , |
|
$from = false , |
|||
$to = false , |
|||
$total = false |
|||
) |
generate separator headers for multipart response
first and last call happen without parameters to generate the initial header and closing sequence, all calls inbetween require content mimetype, start and end byte position and optionaly the total byte length of the requested resource
string | mimetype |
int | start byte position |
int | end byte position |
int | total resource byte size |
Definition at line 1030 of file Server.php.
References $total, and header.
Referenced by http_GET().
HTTP_WebDAV_Server::_new_locktoken | ( | ) |
create a new opaque lock token as defined in RFC2518
void |
Definition at line 1655 of file Server.php.
References _new_uuid().
Referenced by http_LOCK().
HTTP_WebDAV_Server::_new_uuid | ( | ) |
generate Unique Universal IDentifier for lock token
void |
Definition at line 1625 of file Server.php.
References $n.
Referenced by _new_locktoken().
HTTP_WebDAV_Server::_prop_encode | ( | $text | ) |
UTF-8 encode property values if not already done so.
string | text to encode |
Definition at line 2009 of file Server.php.
References $text.
Referenced by http_PROPFIND(), and http_PROPPATCH().
HTTP_WebDAV_Server::_slashify | ( | $path | ) |
Slashify - make sure path ends in a slash.
string | directory path |
Definition at line 2028 of file Server.php.
References $path.
HTTP_WebDAV_Server::_urldecode | ( | $path | ) |
private version of PHP urldecode
not really needed but added for completenes
string | URL to decode |
Definition at line 1991 of file Server.php.
References $path, and $result.
Referenced by _copymove(), and serveRequest().
HTTP_WebDAV_Server::_urlencode | ( | $url | ) |
private minimalistic version of PHP urlencode()
only blanks and XML special chars must be encoded here full urlencode() encoding confuses some clients ...
string | URL to encode |
Definition at line 1974 of file Server.php.
Referenced by http_PROPPATCH().
HTTP_WebDAV_Server::http_COPY | ( | ) |
COPY method handler.
void |
Definition at line 1283 of file Server.php.
References _copymove().
HTTP_WebDAV_Server::http_DELETE | ( | ) |
DELETE method handler.
void |
Definition at line 1248 of file Server.php.
References $_SERVER, $options, $path, _check_lock_status(), array, and http_status().
HTTP_WebDAV_Server::http_GET | ( | ) |
GET method handler.
void |
Definition at line 861 of file Server.php.
References $from, $options, $path, $size, $total, _get_ranges(), _multipart_byterange_header(), array, exit, header, and http_status().
HTTP_WebDAV_Server::http_HEAD | ( | ) |
HEAD method handler.
void |
Definition at line 1069 of file Server.php.
References $options, $path, array, and http_status().
HTTP_WebDAV_Server::http_LOCK | ( | ) |
LOCK method handler.
void |
Definition at line 1323 of file Server.php.
References $_SERVER, $options, $path, _check_lock_status(), _new_locktoken(), array, header, http_status(), and time.
HTTP_WebDAV_Server::http_MKCOL | ( | ) |
MKCOL method handler.
void |
Definition at line 840 of file Server.php.
References $options, $path, array, and http_status().
HTTP_WebDAV_Server::http_MOVE | ( | ) |
MOVE method handler.
void |
Definition at line 1300 of file Server.php.
References _check_lock_status(), _copymove(), and http_status().
HTTP_WebDAV_Server::http_OPTIONS | ( | ) |
GET implementation.
overload this method to retrieve resources from your server
array | &$params | Array of input and output parameters input
output
|
PUT implementation
array | &$params |
COPY implementation
array | &$params |
MOVE implementation
array | &$params |
DELETE implementation
array | &$params |
PROPFIND implementation
array | &$params |
PROPPATCH implementation
array | &$params |
LOCK implementation
array | &$params |
UNLOCK implementation
array | &$params |
overload this method to retrieve and confirm authentication information
string | type Authentication type, e.g. "basic" or "digest" |
string | username Transmitted username |
string | passwort Transmitted password |
overload this method to return shared and exclusive locks active for this resource
string | resource Resource path to check |
The OPTIONS method handler creates a valid OPTIONS reply including Dav: and Allowed: headers based on the implemented methods found in the actual instance
void |
Definition at line 471 of file Server.php.
References _allow(), array, header, http_status(), and writelog().
HTTP_WebDAV_Server::http_PROPFIND | ( | ) |
PROPFIND method handler.
void |
Definition at line 505 of file Server.php.
References $_SERVER, $file, $files, $key, $options, $path, _prop_encode(), array, header, http_status(), lockdiscovery(), and mkprop().
HTTP_WebDAV_Server::http_PROPPATCH | ( | ) |
PROPPATCH method handler.
void |
Definition at line 783 of file Server.php.
References $_SERVER, $options, $path, _check_lock_status(), _prop_encode(), _urlencode(), array, header, and http_status().
HTTP_WebDAV_Server::http_PUT | ( | ) |
PUT method handler.
void |
Definition at line 1103 of file Server.php.
References $_SERVER, $key, $options, $path, GuzzleHttp\Psr7\$stream, _check_lock_status(), array, and http_status().
HTTP_WebDAV_Server::http_status | ( | $status | ) |
set HTTP return status and mirror it in a private header
string | status code and message |
Definition at line 1949 of file Server.php.
References header.
Referenced by _copymove(), http_DELETE(), http_GET(), http_HEAD(), http_LOCK(), http_MKCOL(), http_MOVE(), http_OPTIONS(), http_PROPFIND(), http_PROPPATCH(), http_PUT(), http_UNLOCK(), serveRequest(), and ilDAVServer\serveRequest().
HTTP_WebDAV_Server::http_UNLOCK | ( | ) |
UNLOCK method handler.
void |
Definition at line 1438 of file Server.php.
References $_SERVER, $options, $path, array, and http_status().
HTTP_WebDAV_Server::lockdiscovery | ( | $path | ) |
Generate lockdiscovery reply from checklock() result.
string | resource path to check |
Definition at line 1901 of file Server.php.
Referenced by http_PROPFIND().
HTTP_WebDAV_Server::mkprop | ( | ) |
helper for property element creation
string | XML namespace (optional) |
string | property name |
string | property value |
Definition at line 1571 of file Server.php.
References array.
Referenced by ilDAVServer\fileinfo(), and http_PROPFIND().
HTTP_WebDAV_Server::serveRequest | ( | ) |
Serve WebDAV HTTP request.
dispatch WebDAV HTTP request to the apropriate method handler
void |
Definition at line 125 of file Server.php.
References $_SERVER, $uri, _allow(), _check_auth(), _check_if_header_conditions(), _urldecode(), header, http_status(), and writelog().
|
private |
Writes a message to the logfile.,.
message | String. |
Definition at line 2042 of file Server.php.
References $DIC, $ilUser, $log, and $message.
Referenced by http_OPTIONS(), and serveRequest().
HTTP_WebDAV_Server::$_http_status = "200 OK" |
Definition at line 90 of file Server.php.
HTTP_WebDAV_Server::$_if_header_uris = array() |
Definition at line 83 of file Server.php.
HTTP_WebDAV_Server::$_prop_encoding = "utf-8" |
Definition at line 97 of file Server.php.
HTTP_WebDAV_Server::$base_uri |
Definition at line 54 of file Server.php.
HTTP_WebDAV_Server::$dav_powered_by = "" |
Definition at line 76 of file Server.php.
HTTP_WebDAV_Server::$http_auth_realm = "PHP WebDAV" |
Definition at line 69 of file Server.php.
HTTP_WebDAV_Server::$path |
Definition at line 62 of file Server.php.
Referenced by _check_lock_status(), _copymove(), _slashify(), _urldecode(), ilDAVServer\checkLock(), ilDAVServer\davBasename(), ilDAVServer\davDeslashify(), ilDAVServer\davUrlEncode(), ilDAVServer\DELETE(), ilDAVServer\GET(), ilDAVServer\getDir(), http_DELETE(), http_GET(), http_HEAD(), http_LOCK(), http_MKCOL(), http_PROPFIND(), http_PROPPATCH(), http_PUT(), http_UNLOCK(), ilDAVServer\LOCK(), lockdiscovery(), ilDAVServer\MKCOL(), ilDAVServer\mountDir(), ilDAVServer\PROPFIND(), ilDAVServer\PROPPATCH(), ilDAVServer\PUT(), ilDAVServer\showMountInstructions(), and ilDAVServer\UNLOCK().
HTTP_WebDAV_Server::$uri |
Definition at line 46 of file Server.php.
Referenced by _check_if_header_conditions(), _if_header_lexer(), _if_header_parser(), ilDAVServer\getFileURI(), ilDAVServer\getFolderURI(), ilDAVServer\getMountURI(), ilDAVServer\getObjectURI(), and serveRequest().