Qore xml Module  1.7.1
WebDavHandler::AbstractWebDavHandler Class Referenceabstract

Abstract WebDavHandler interface class. More...

Inheritance diagram for WebDavHandler::AbstractWebDavHandler:
WebDavHandler::DummyWebDavHandler WebDavHandler::FsWebDavHandler WebDavHandler::WebDavHandlerProxy

Public Member Methods

 constructor (*AbstractAuthenticator auth)
 Creates the object with an empty logger and an in-memory property handler. More...
 
 constructor (*AbstractAuthenticator auth, string virtual_relative_path_base)
 Creates the object with the given argument and an in-memory property handler. More...
 
 constructor (*AbstractAuthenticator auth, AbstractWebDavPropertyHandler property_handler, string virtual_relative_path_base='/')
 Creates the object with the given arguments. More...
 
 constructor (*AbstractAuthenticator auth, Logger logger, AbstractWebDavPropertyHandler property_handler=new InMemoryWebDavPropertyHandler(), string virtual_relative_path_base='/')
 Creates the object with the given arguments. More...
 
list< string > getHttpMethods ()
 Returnd a list of WebDavHandler methods.
 
 setLogger (Logger logger)
 Replace the logger.
 
hash< HttpResponseInfo > handleRequest (HttpListenerInterface listener, Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP/WebDavHandler requests and returns the response.
 
string getRelativePath (string raw_path)
 Returns a relative path from an absolute path. More...
 
hash< HttpResponseInfo > response (int response_code=200, data msg='OK')
 Returns a hash that can be used as an HTTP response with the given HTTP response code and response message.
 
hash< HttpResponseInfo > response (int response_code=200, hash< auto > hdr)
 Returns a hash that can be used as an HTTP response with the given HTTP response code and response headers.
 
hash< HttpResponseInfo > resp400 (data msg='Bad Request')
 Returns a hash that can be used as an HTTP response with a 400 response code and response message.
 
hash< HttpResponseInfo > resp404 ()
 Returns a hash that can be used as an HTTP response with a 404 response code and response message.
 
hash< HttpResponseInfo > resp500 (data msg='General Server Error')
 Returns a hash that can be used as an HTTP response with a 500 response code and response message.
 
hash< HttpResponseInfo > resp501 ()
 Returns a hash that can be used as an HTTP response with a 501 response code and response message.
 
private init (Logger logger, AbstractWebDavPropertyHandler property_handler, string virtual_relative_path_base="/")
 Common constructor code.
 
private hash< auto > preparePropFindXmlResponse (string local_path, string href, bool is_collection, hash< auto > base_props, bool all_props=False, *hash< string, hash< string, bool >> additional_props)
 Returns a hash that can be serialized to an XML string for a PROPFIND request.
 
hash< HttpResponseInfo > handleOptions (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles a WebDavHandler OPTIONS request. More...
 
hash< HttpResponseInfo > handleGet (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP GET requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleHead (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP HEAD requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handlePost (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP POST requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handlePut (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP PUT requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleDelete (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP DELETE requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleCopy (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler COPY requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleMove (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler MOVE requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleLock (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler LOCK requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleUnlock (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler UNLOCK requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleMkcol (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler MKCOL requests for WebDavHandler resources. More...
 
hash< HttpResponseInfo > handlePropfind (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler PROPFIND requests for WebDavHandler resources; reetrieves properties from WebDavHandler resources. More...
 
hash< HttpResponseInfo > handleProppatch (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler PROPPATCH requests for WebDavHandler resources; sets or removes properties on WebDavHandler resources. More...
 
 logInfo (string fmt)
 This method is called with informational log messages.
 
 logError (string fmt)
 This method is called with error log messages.
 
 logDebug (string fmt)
 This method is called with debug log messages.
 
abstract private *hash< string, hash< string, hash< string, bool > > > handleProppatchImpl (reference< string > href, hash< auto > cx, hash< auto > hdr, *hash< auto > request_xml, *list< hash< PropPatchActionInfo >> actions)
 Internal method for handling PROPPATCH requests. More...
 

Static Public Member Methods

static combineValue (reference< auto > h, auto v)
 Combines values recursively.
 

Public Attributes

const RequestMethods
 A hash of all supported WebDavHandler methods mapped to method names.
 
const DestMethods
 A hash of methods that require a Destination header.
 
const AllowHeaderValue = RequestMethods.keys().join(",")
 List of WebDavHandler methods in a string suitable for use in HTTP responses.
 
const MethodList = keys RequestMethods
 List of WebDavHandler methods.
 
const PPA_Remove = "R"
 PROPPATCH action: remove.
 
const PPA_Set = "S"
 PROPPATCH action: set.
 

Private Member Methods

string getRealPath (string raw_path)
 Converts a request path to a normalized real path on the filesystem in the root WebDavHandler directory. More...
 
*hash< HttpResponseInfo > checkAuth (string method, hash< auto > cx, hash< auto > hdr, *data body)
 Checks if the request is authorized; if not, this method must return a value. More...
 
 copyProperties (string source_url, string target_url)
 Copies all properties from the given source URL to the target URL.
 
 moveProperties (string source_url, string target_url)
 Moves all properties from the given source URL to the target URL.
 
 deleteProperties (string source_url)
 Deletes all properties from the given URL.
 
string getStatusMessage (softstring http_code)
 Returns a status message for the given HTTP response code. More...
 
hash< auto > getXml (string body)
 Parse incoming XML and handle namespaces.
 
hash< HttpResponseInfo > handleOptionsImpl (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles an HTTP/WebDavHandler OPTIONS request. More...
 
abstract hash< HttpResponseInfo > handleGetImpl (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP GET requests for WebDavHandler resources. More...
 
abstract hash< HttpResponseInfo > handleHeadImpl (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP HEAD requests for WebDavHandler resources. More...
 
abstract hash< HttpResponseInfo > handlePostImpl (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP POST requests for WebDavHandler resources. More...
 
abstract hash< HttpResponseInfo > handlePutImpl (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP PUT requests for WebDavHandler resources. More...
 
abstract hash< HttpResponseInfo > handleDeleteImpl (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles HTTP DELETE requests for WebDavHandler resources. More...
 
abstract hash< HttpResponseInfo > handleCopyImpl (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler COPY requests for WebDavHandler resources. More...
 
abstract hash< HttpResponseInfo > handleMoveImpl (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler MOVE requests for WebDavHandler resources. More...
 
abstract hash< HttpResponseInfo > handleLockImpl (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler LOCK requests for WebDavHandler resources. More...
 
abstract hash< HttpResponseInfo > handleUnlockImpl (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler UNLOCK requests for WebDavHandler resources. More...
 
abstract hash< HttpResponseInfo > handleMkcolImpl (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler MKCOL requests for WebDavHandler resources. More...
 
abstract hash< HttpResponseInfo > handlePropfindImpl (Socket s, hash< auto > cx, hash< auto > hdr, *data body)
 Handles WebDavHandler PROPFIND requests for WebDavHandler resources; reetrieves properties from WebDavHandler resources. More...
 

Private Attributes

AbstractWebDavPropertyHandler property_handler
 The property handler object.
 
string virtual_base_path
 The virtual base path for resources served by the WebDavHandler handler.
 
Logger logger
 The Logger for this object.
 

Detailed Description

Abstract WebDavHandler interface class.

Member Function Documentation

◆ checkAuth()

*hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::checkAuth ( string  method,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
private

Checks if the request is authorized; if not, this method must return a value.

Override this in a subclass to implement authorization controls

◆ constructor() [1/4]

WebDavHandler::AbstractWebDavHandler::constructor ( *AbstractAuthenticator  auth)

Creates the object with an empty logger and an in-memory property handler.

Parameters
auththe authentication object to use to authenticate connections

◆ constructor() [2/4]

WebDavHandler::AbstractWebDavHandler::constructor ( *AbstractAuthenticator  auth,
AbstractWebDavPropertyHandler  property_handler,
string  virtual_relative_path_base = '/' 
)

Creates the object with the given arguments.

Parameters
auththe authentication object to use to authenticate connections
property_handlerto handle properties
virtual_relative_path_basethe virtual base path for WebDavHandler requests; this path will be stripped from requests internally when serving WebDavHandler resources

◆ constructor() [3/4]

WebDavHandler::AbstractWebDavHandler::constructor ( *AbstractAuthenticator  auth,
Logger  logger,
AbstractWebDavPropertyHandler  property_handler = new InMemoryWebDavPropertyHandler(),
string  virtual_relative_path_base = '/' 
)

Creates the object with the given arguments.

Parameters
auththe authentication object to use to authenticate connections
loggerthe logger
property_handlerto handle properties
virtual_relative_path_basethe virtual base path for WebDavHandler requests; this path will be stripped from requests internally when serving WebDavHandler resources

◆ constructor() [4/4]

WebDavHandler::AbstractWebDavHandler::constructor ( *AbstractAuthenticator  auth,
string  virtual_relative_path_base 
)

Creates the object with the given argument and an in-memory property handler.

Parameters
auththe authentication object to use to authenticate connections
virtual_relative_path_basethe virtual base path for WebDavHandler requests; this path will be stripped from requests internally when serving WebDavHandler resources

◆ getRealPath()

string WebDavHandler::AbstractWebDavHandler::getRealPath ( string  raw_path)
private

Converts a request path to a normalized real path on the filesystem in the root WebDavHandler directory.

Exceptions
WEBDAVHANDLER-FORBIDDENif the path is not valid

◆ getRelativePath()

string WebDavHandler::AbstractWebDavHandler::getRelativePath ( string  raw_path)

Returns a relative path from an absolute path.

Parameters
raw_paththe rar path to process
Returns
a relative path generated by stripping any virtual base path (set in the constructor) from the argument

◆ getStatusMessage()

string WebDavHandler::AbstractWebDavHandler::getStatusMessage ( softstring  http_code)
private

Returns a status message for the given HTTP response code.

Exceptions
RESPONSE-ERRORthe code is unknown

◆ handleCopy()

hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleCopy ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)

Handles WebDavHandler COPY requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the WebDavHandler request
Note
this base class method calls handleCopyImpl() to process the request

◆ handleCopyImpl()

abstract hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleCopyImpl ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatepure virtual

Handles WebDavHandler COPY requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the WebDavHandler request

Implemented in WebDavHandler::DummyWebDavHandler, and WebDavHandler::FsWebDavHandler.

◆ handleDelete()

hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleDelete ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)

Handles HTTP DELETE requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the HTTP request
Note
this base class method calls handleDeleteImpl() to process the request

◆ handleDeleteImpl()

abstract hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleDeleteImpl ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatepure virtual

Handles HTTP DELETE requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the HTTP request

Implemented in WebDavHandler::DummyWebDavHandler, and WebDavHandler::FsWebDavHandler.

◆ handleGet()

hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleGet ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)

Handles HTTP GET requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the HTTP request
Note
this base class method calls handleGetImpl() to process the request

◆ handleGetImpl()

abstract hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleGetImpl ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatepure virtual

Handles HTTP GET requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the HTTP request

Implemented in WebDavHandler::DummyWebDavHandler, and WebDavHandler::FsWebDavHandler.

◆ handleHead()

hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleHead ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)

Handles HTTP HEAD requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the HTTP request
Note
this base class method calls handleHeadImpl() to process the request

◆ handleHeadImpl()

abstract hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleHeadImpl ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatepure virtual

Handles HTTP HEAD requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the HTTP request

Implemented in WebDavHandler::DummyWebDavHandler, and WebDavHandler::FsWebDavHandler.

◆ handleLock()

hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleLock ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)

Handles WebDavHandler LOCK requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the WebDavHandler request
Note
this base class method calls handleLockImpl() to process the request

◆ handleLockImpl()

abstract hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleLockImpl ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatepure virtual

Handles WebDavHandler LOCK requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the WebDavHandler request

Implemented in WebDavHandler::DummyWebDavHandler, and WebDavHandler::FsWebDavHandler.

◆ handleMkcol()

hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleMkcol ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)

Handles WebDavHandler MKCOL requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the WebDavHandler request
Note
this base class method calls handleMkcolImpl() to process the request

◆ handleMkcolImpl()

abstract hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleMkcolImpl ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatepure virtual

Handles WebDavHandler MKCOL requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the WebDavHandler request

Implemented in WebDavHandler::DummyWebDavHandler, and WebDavHandler::FsWebDavHandler.

◆ handleMove()

hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleMove ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)

Handles WebDavHandler MOVE requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the WebDavHandler request
Note
this base class method calls handleMoveImpl() to process the request

◆ handleMoveImpl()

abstract hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleMoveImpl ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatepure virtual

Handles WebDavHandler MOVE requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the WebDavHandler request

Implemented in WebDavHandler::DummyWebDavHandler, and WebDavHandler::FsWebDavHandler.

◆ handleOptions()

hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleOptions ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)

Handles a WebDavHandler OPTIONS request.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
a 200 response with headers indicating WebDavHandler support
Note
this base class method calls handleOptionsImpl() to process the request

◆ handleOptionsImpl()

hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleOptionsImpl ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
private

Handles an HTTP/WebDavHandler OPTIONS request.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
a 200 response with headers indicating WebDavHandler support

◆ handlePost()

hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handlePost ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)

Handles HTTP POST requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the HTTP request
Note
this base class method calls handlePostImpl() to process the request

◆ handlePostImpl()

abstract hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handlePostImpl ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatepure virtual

Handles HTTP POST requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the HTTP request

Implemented in WebDavHandler::DummyWebDavHandler, and WebDavHandler::FsWebDavHandler.

◆ handlePropfind()

hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handlePropfind ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)

Handles WebDavHandler PROPFIND requests for WebDavHandler resources; reetrieves properties from WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the WebDavHandler request
Note
this base class method calls handlePropfindImpl() to process the request

◆ handlePropfindImpl()

abstract hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handlePropfindImpl ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatepure virtual

Handles WebDavHandler PROPFIND requests for WebDavHandler resources; reetrieves properties from WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the WebDavHandler request

Implemented in WebDavHandler::DummyWebDavHandler, and WebDavHandler::FsWebDavHandler.

◆ handleProppatch()

hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleProppatch ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)

Handles WebDavHandler PROPPATCH requests for WebDavHandler resources; sets or removes properties on WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the WebDavHandler request
Note
this base class method calls handleProppatchImpl() to process the request

◆ handleProppatchImpl()

abstract private *hash<string, hash<string, hash<string, bool> > > WebDavHandler::AbstractWebDavHandler::handleProppatchImpl ( reference< string >  href,
hash< auto >  cx,
hash< auto >  hdr,
*hash< auto >  request_xml,
*list< hash< PropPatchActionInfo >>  actions 
)
pure virtual

Internal method for handling PROPPATCH requests.

Parameters
hrefthe href for the response
cxthe HTTP call context
hdras hash HTTP headers
request_xmlthe parsed XML in the request
actionsa list of set and remove actions to execute on the given properties
Returns
a status map of HTTP code -> namespace -> property -> True
Exceptions
WEBDAVHANDLER-ERRORan error occured

Implemented in WebDavHandler::FsWebDavHandler, and WebDavHandler::DummyWebDavHandler.

◆ handlePut()

hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handlePut ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)

Handles HTTP PUT requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the HTTP request
Note
this base class method calls handlePutImpl() to process the request

◆ handlePutImpl()

abstract hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handlePutImpl ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatepure virtual

Handles HTTP PUT requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the HTTP request

Implemented in WebDavHandler::DummyWebDavHandler, and WebDavHandler::FsWebDavHandler.

◆ handleUnlock()

hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleUnlock ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)

Handles WebDavHandler UNLOCK requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the WebDavHandler request
Note
this base class method calls handleUnlockImpl() to process the request

◆ handleUnlockImpl()

abstract hash<HttpResponseInfo> WebDavHandler::AbstractWebDavHandler::handleUnlockImpl ( Socket  s,
hash< auto >  cx,
hash< auto >  hdr,
*data  body 
)
privatepure virtual

Handles WebDavHandler UNLOCK requests for WebDavHandler resources.

Parameters
cxcall context hash; this hash will have the following keys:
  • header-info: a hash of information about the request header with the following keys:
    • accept-charset: this key will be set to an appropriate value from any "Accept-Charset" header; if any of "*", "utf8", or "utf-8" are present, then this will be set to "utf8", otherwise it will be set to the first requested character encoding in the list
    • accept-encoding: a hash where keys are values from any "Accept-Encoding" header and the values are True
    • body-content-type: this is the "Content-Type" header without any charset declaration
    • charset: if there is a charset declaration in the "Content-Type" header, the value is returned in this key
    • client-cert: if the server is configured to capture remote client certificates, and the client supplied a certificate, this key will be populated with the SSLCertificate for the client
    • close: set to True if the connection should be closed after responding, False if not (as derived from the request header)
    • headers-raw: a hash of raw request headers without any case conversions or other processing
    • request-uri: gives the request URI in an HTTP request
  • socket: the bind address used to bind the listener ("socket-info" provides more detailed information)
  • socket-info: a hash of socket information for the listening socket (as returned by Qore::Socket::getSocketInfo())
  • peer-info: a hash of socket information for the remote socket (as returned by Qore::Socket::getPeerInfo())
  • url: a hash of broken-down URL information (as returned from Qore::parse_url())
  • id: the unique HTTP connection ID
  • ssl: True if the request was encrypted with HTTPS, False if not
  • listener-id: the HTTP server listener ID (see HttpServer::getListenerInfo())
  • user: the current RBAC username (if any)
  • root_path: the root URL path matched if the request was matched by a URL prefix
hdrincoming header hash; all keys will be converted to lower-case, additionally the following keys will be present:
  • method: the HTTP method received (ie "GET", "POST", etc)
  • path: the HTTP path given in the request, after processing by Qore::decode_uri_request()
  • http_version: the HTTP version number in the request (either "1.0" or "1.1")
bodymessage body, if any
Returns
the response to the WebDavHandler request

Implemented in WebDavHandler::DummyWebDavHandler, and WebDavHandler::FsWebDavHandler.


The documentation for this class was generated from the following file: