ILIAS
Release_5_0_x_branch Revision 61816
|
Public Member Functions | |
HTTP_WebDAV_Server () | |
Constructor. | |
serveRequest () | |
Serve WebDAV HTTP request. | |
http_OPTIONS () | |
GET implementation. | |
http_PROPFIND () | |
PROPFIND method handler. | |
http_PROPPATCH () | |
PROPPATCH method handler. | |
http_MKCOL () | |
MKCOL method handler. | |
http_GET () | |
GET method handler. | |
_get_ranges (&$options) | |
parse HTTP Range: header | |
_multipart_byterange_header ($mimetype=false, $from=false, $to=false, $total=false) | |
generate separator headers for multipart response | |
http_HEAD () | |
HEAD method handler. | |
http_PUT () | |
PUT method handler. | |
http_DELETE () | |
DELETE method handler. | |
http_COPY () | |
COPY method handler. | |
http_MOVE () | |
MOVE method handler. | |
http_LOCK () | |
LOCK method handler. | |
http_UNLOCK () | |
UNLOCK method handler. | |
_copymove ($what) | |
_allow () | |
check for implemented HTTP methods | |
mkprop () | |
helper for property element creation | |
_check_auth () | |
check authentication if check is implemented | |
_new_uuid () | |
generate Unique Universal IDentifier for lock token | |
_new_locktoken () | |
create a new opaque lock token as defined in RFC2518 | |
_if_header_lexer ($string, &$pos) | |
_if_header_parser ($str) | |
parse If: header | |
_check_if_header_conditions () | |
check if conditions from "If:" headers are meat | |
_check_uri_condition ($uri, $condition) | |
Check a single URI condition parsed from an if-header. | |
_check_lock_status ($path, $exclusive_only=false) | |
lockdiscovery ($path) | |
Generate lockdiscovery reply from checklock() result. | |
http_status ($status) | |
set HTTP return status and mirror it in a private header | |
_urlencode ($url) | |
private minimalistic version of PHP urlencode() | |
_urldecode ($path) | |
private version of PHP urldecode | |
_prop_encode ($text) | |
UTF-8 encode property values if not already done so. | |
_slashify ($path) | |
Slashify - make sure path ends in a slash. |
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 | |
writelog ($message) | |
Writes a message to the logfile.,. |
Definition at line 37 of file Server.php.
HTTP_WebDAV_Server::_allow | ( | ) |
check for implemented HTTP methods
void |
Definition at line 1511 of file Server.php.
Referenced by http_OPTIONS(), and serveRequest().
HTTP_WebDAV_Server::_check_auth | ( | ) |
check authentication if check is implemented
void |
Definition at line 1573 of file Server.php.
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 1786 of file Server.php.
References $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 1847 of file Server.php.
References $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 1833 of file Server.php.
Referenced by _check_if_header_conditions().
HTTP_WebDAV_Server::_copymove | ( | $what | ) |
Definition at line 1448 of file Server.php.
References $options, $path, _check_lock_status(), _urldecode(), 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 986 of file Server.php.
References $options.
Referenced by http_GET().
HTTP_WebDAV_Server::_if_header_lexer | ( | $string, | |
& | $pos | ||
) |
string | header string to parse |
int | current parsing position |
Definition at line 1647 of file Server.php.
References $uri.
Referenced by _if_header_parser().
HTTP_WebDAV_Server::_if_header_parser | ( | $str | ) |
parse If: header
string | header string |
Definition at line 1701 of file Server.php.
References $uri, and _if_header_lexer().
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 1020 of file Server.php.
References $total.
Referenced by http_GET().
HTTP_WebDAV_Server::_new_locktoken | ( | ) |
create a new opaque lock token as defined in RFC2518
void |
Definition at line 1631 of file Server.php.
Referenced by http_LOCK().
HTTP_WebDAV_Server::_new_uuid | ( | ) |
generate Unique Universal IDentifier for lock token
void |
Definition at line 1601 of file Server.php.
References $n.
HTTP_WebDAV_Server::_prop_encode | ( | $text | ) |
UTF-8 encode property values if not already done so.
string | text to encode |
Definition at line 1984 of file Server.php.
Referenced by http_PROPFIND(), and http_PROPPATCH().
HTTP_WebDAV_Server::_slashify | ( | $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 1966 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 1949 of file Server.php.
HTTP_WebDAV_Server::http_COPY | ( | ) |
COPY method handler.
void |
Definition at line 1267 of file Server.php.
References _copymove().
HTTP_WebDAV_Server::http_DELETE | ( | ) |
DELETE method handler.
void |
Definition at line 1232 of file Server.php.
References $options, $path, _check_lock_status(), and http_status().
HTTP_WebDAV_Server::http_GET | ( | ) |
GET method handler.
void |
Definition at line 851 of file Server.php.
References $options, $path, $size, $total, _get_ranges(), _multipart_byterange_header(), exit, and http_status().
HTTP_WebDAV_Server::http_HEAD | ( | ) |
HEAD method handler.
void |
Definition at line 1059 of file Server.php.
References $options, $path, and http_status().
HTTP_WebDAV_Server::http_LOCK | ( | ) |
LOCK method handler.
void |
Definition at line 1307 of file Server.php.
References $options, $path, _check_lock_status(), _new_locktoken(), and http_status().
HTTP_WebDAV_Server::http_MKCOL | ( | ) |
MKCOL method handler.
void |
Definition at line 830 of file Server.php.
References $options, $path, and http_status().
HTTP_WebDAV_Server::http_MOVE | ( | ) |
MOVE method handler.
void |
Definition at line 1284 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 478 of file Server.php.
References _allow(), http_status(), and writelog().
HTTP_WebDAV_Server::http_PROPFIND | ( | ) |
PROPFIND method handler.
void |
Definition at line 512 of file Server.php.
References $file, $options, $path, _prop_encode(), http_status(), lockdiscovery(), and mkprop().
HTTP_WebDAV_Server::http_PROPPATCH | ( | ) |
PROPPATCH method handler.
void |
Definition at line 773 of file Server.php.
References $options, $path, _check_lock_status(), _prop_encode(), and http_status().
HTTP_WebDAV_Server::http_PUT | ( | ) |
PUT method handler.
void |
Definition at line 1089 of file Server.php.
References $options, $path, _check_lock_status(), 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 1924 of file Server.php.
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 1422 of file Server.php.
References $options, $path, and http_status().
HTTP_WebDAV_Server::HTTP_WebDAV_Server | ( | ) |
Constructor.
void |
Definition at line 108 of file Server.php.
Referenced by ilDAVServer\ilDAVServer().
HTTP_WebDAV_Server::lockdiscovery | ( | $path | ) |
Generate lockdiscovery reply from checklock() result.
string | resource path to check |
Definition at line 1876 of file Server.php.
References $path.
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 1551 of file Server.php.
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 |
Reimplemented in ilDAVServer.
Definition at line 125 of file Server.php.
References $uri, _allow(), _check_auth(), _check_if_header_conditions(), _urldecode(), http_status(), and writelog().
|
private |
Writes a message to the logfile.,.
message | String. |
Reimplemented in ilDAVServer.
Definition at line 2016 of file Server.php.
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().