View module in:   git


Universal Content Broker (UCB)

Universal Content Broker (has ucps) which do things like convert files to strings in content broker world, or connect LibreOffice with various DMS and fileshare systems like WebDAV, CMIS, or GIO.

The UCPs implement the Universal Content Provider UNO interfaces in C++, in particular the service.


The WebDAV content provider is based on libcurl for much of the network and protocol stuff, including authentication.

WebDAV as implemented here is defined in an IETF RFC 4918 extensions, and the code supports both unencrypted HTTP/1.1 (IETF RFC 2616) as well as TLS 1.2 or later.

Our WebDAV service implementation registers the and http URI schemes (and their encrypted TLS variants). See here for the specification:

Historically, webdav had two ucps, one based on neon, the second one based on serf. Both are superseded by the current libcurl implementation (since LibreOffice 7.3), but in case of behavioural differences, go hunt for code differences (ucb/source/ucp/webdav-neon and ucb/source/ucp/webdav).

The WebDAV protocol is implemented on top of libcurl basic http GET, PUT, and POST requests (and is relatively straight-forward - see ucb/source/ucp/webdav-curl/webdavcontent.cxx for the main functionality), but incorporates custom handling for a number of server idiosyncrasies:

To a first approximation, there are 3 parts involved in the UCP:

The most important classes are: * ContentProvider: the UNO entry point/factory, creates Content instances * Content: the main UNO service, translates the UCP API to WebDAV methods, one instance per URL * DAVResourceAccess: sits between Content and CurlSession * DAVSessionFactory: creates CurlSession for DAVResourceAccess * CurlSession: low-level interfacing with libcurl * SerfLockStore: singleton used by CurlSession to store DAV lock tokens, runs a thread to refresh locks when they expire * WebDAVResponseParser: parse XML responses to LOCK, PROPFIND requests * DAVAuthListener_Impl: request credentials from UI via UNO