You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
eXist's WebDAV article should include documentation about the feature introduced in eXist-db/exist@2c6e455. I'd propose this draft - comments welcome! I'd especially appreciate review of the text by @dizzzz, who created the feature.
WebDAV clients typically display the size of files in a directory or use this information when downloading a resource. While the size of binary files can be easily determined in the file system, this is not so for XML documents stored in eXist-db. This is because exact size of an XML document is dependent on serialization parameters (e.g., indentation), and eXist-db does not store XML documents in a serialized form. Calculating the exact size of a document for a given set of serialization would require serializing it, which could slow down the process of listing the contents of a collection. Thus, by default, eXist-db presents WebDAV clients with an "approximate" size of documents, calculated by multiplying the "page size" by the "number of pages" used to store a document in the database. The approximate size is a good indication of the size of documents, but some WebDAV clients cannot deal with this approximation, causing downloaded resources to be improperly truncated or padded.
Two system variables can be set to change the way the size is calculated. They must be set at eXist-db's startup time. The properties are:
org.exist.webdav.PROPFIND_METHOD_XML_SIZE
org.exist.webdav.GET_METHOD_XML_SIZE
The available values for these properties are:
NULL (no size reported; fastest)
APPROXIMATE (an approximate size is provided but is not guaranteed to be correct; fast)
EXACT (exact size is reported, by first serializing the document to measure its length; slowest)
The defaults for each property are as follows:
PROPFIND: By default, the PROPFIND property is set to APPROXIMATE by default. The exception is the macOS Finder WebDAV client, which cannot handle the values NULL or APPROXIMATE. Thus, for compatibility, eXist-db checks the user agent string and always sets this property to EXACT for the macOS Finder.
GET: By default, the GET property is set to NULL (and this value works well for macOS).
Screenshots
n/a
Please provide the following
exist-db version: 6.1.0-SNAPSHOT
documentation version: 5.4.0
The text was updated successfully, but these errors were encountered:
This is a great piece of documentation and we should merge this as soon as possible. @joewiz thank you for writing up this complex issue in an accessible way
I wonder where the best place to put this is? Perhaps in http://www.exist-db.org/exist/apps/doc/webdav under the Compatibility section, which mentions the issue with sizing already in brief, but doesn't mention that there is an option to change the calculation.
Describe the problem
eXist's WebDAV article should include documentation about the feature introduced in eXist-db/exist@2c6e455. I'd propose this draft - comments welcome! I'd especially appreciate review of the text by @dizzzz, who created the feature.
WebDAV clients typically display the size of files in a directory or use this information when downloading a resource. While the size of binary files can be easily determined in the file system, this is not so for XML documents stored in eXist-db. This is because exact size of an XML document is dependent on serialization parameters (e.g., indentation), and eXist-db does not store XML documents in a serialized form. Calculating the exact size of a document for a given set of serialization would require serializing it, which could slow down the process of listing the contents of a collection. Thus, by default, eXist-db presents WebDAV clients with an "approximate" size of documents, calculated by multiplying the "page size" by the "number of pages" used to store a document in the database. The approximate size is a good indication of the size of documents, but some WebDAV clients cannot deal with this approximation, causing downloaded resources to be improperly truncated or padded.
Two system variables can be set to change the way the size is calculated. They must be set at eXist-db's startup time. The properties are:
org.exist.webdav.PROPFIND_METHOD_XML_SIZE
org.exist.webdav.GET_METHOD_XML_SIZE
The available values for these properties are:
NULL
(no size reported; fastest)APPROXIMATE
(an approximate size is provided but is not guaranteed to be correct; fast)EXACT
(exact size is reported, by first serializing the document to measure its length; slowest)The defaults for each property are as follows:
PROPFIND
: By default, thePROPFIND
property is set toAPPROXIMATE
by default. The exception is the macOS Finder WebDAV client, which cannot handle the valuesNULL
orAPPROXIMATE
. Thus, for compatibility, eXist-db checks the user agent string and always sets this property toEXACT
for the macOS Finder.GET
: By default, theGET
property is set toNULL
(and this value works well for macOS).Screenshots
n/a
Please provide the following
The text was updated successfully, but these errors were encountered: