Apache OpenOffice (AOO) Bugzilla – Issue 121922
webdav ucp: getPropertyValues returns empty values after the first call
Last modified: 2022-10-28 12:54:27 UTC
Retrieve one or more properties from a webdav content. For example: Testing http://people.apache.org/~arielch/images/avatar.png ContentType: IsDocument: 1 IsFolder: 0 DateCreated: 00-00-0000 00:00:00 DateModified: 02-18-2013 09:10:31 MediaType: image/png Size: 81635 Title: avatar.png Retrieve one or more properties once again: ContentType: IsDocument: 1 IsFolder: 0 DateCreated: 00-00-0000 00:00:00 DateModified: 00-00-0000 00:00:00 MediaType: image/png Size: <empty> Title: avatar.png Non-cacheable properties, like Size and DateModified are empty after the first execution of getPropertyValues
The condition on http://svn.apache.org/viewvc/incubator/ooo/trunk/main/ucb/source/ucp/webdav/webdavcontent.cxx?revision=1294557&view=markup#l1328 seems wrong: 1328 // All properties obtained already? 1329 std::vector< rtl::OUString > aMissingProps; 1330 if ( !( xProps.get() 1331 && xProps->containsAllNames( 1332 rProperties, aMissingProps ) ) 1333 && !m_bDidGetOrHead ) IF there are properties that are not cached AND we didn't already perform a GET or HEAD, then ... the first time "getPropertyValues" or "open" is executed, cacheable properties are stored (enhancement: instead of caching all cacheable properties in the response, only those explicitly asked are cached), and m_bDidGetOrHead is set to true. If you execute again "getPropertyValues", m_bDidGetOrHead is true, so the code doesn't perform a HEAD request again; if you ask for non-cacheable properties, you get empty Anys. Non-cacheable properties are the ones defined in aNonCachableProps (correct English seems to be cacheable) http://svn.apache.org/viewvc/incubator/ooo/trunk/main/ucb/source/ucp/webdav/ContentProperties.cxx?revision=1292794&view=markup#l588
"arielch" committed SVN revision 1460353 into trunk: i121922 - Fix wrong condition
Fixed on trunk