[Patch] Webdav properties in UDSAtoms
Hamish Rodda
meddie at yoyo.its.monash.edu.au
Mon Jun 3 11:31:32 BST 2002
On Mon, 3 Jun 2002 17:33, Best, Jan-Pascal van wrote:
> From looking at the patch, there's still some issues IMO:
> - I think we should leave out the special case handling for
> empty "davRequestResponse" metadata. If an application is
> smart enough to send this request, it's smart enough to
> enter the "<D:prop><allprop/>", right?
Well, if it does that, how do we know whether or not to append the properties
we need? That is, if we keep the current system, see below.
> - As a workaround for the unfinished <prop> element awkwardness,
> can't we require from the application side that the standard
> elements (creationdate,getcontentlength,etc.) should always
> be queried? That would make the http.cc part so much simpler.
> Does anyone know what would go wrong if this application
> doesn't comply, but also does not make use of the returned
> UDS creation date etc.? I'll also be trying this.
I don't really trust the app here. I would guess that most people wanting to
use this will have other things on their mind than satisfying the ioslave.
Plus, we might need to change them later on. Is the unfinished prop such a
problem? if so, we could add another metadata to specify any additional
namespaces required.
If the app doesn't comply, we won't even know whether the item is a directory
or a file, but I don't think it will crash on us, just return basically no
info.
If you still think the best solution is just letting the app take over, I
don't really mind.
> BTW: Next will probaly be the PROPPATCH method, when I start thinking
> about write access to Exchange server (shudder). I guess that will have
> to be special() function? Another idea might be to create a generic
> WebDavJob class, and the appropriate KIO::webdav() function, with
> as arguments the URL, the HTTP_METHOD and the XML request. The result
> would be the XML reply. Would this conflict with the KIO concepts
> (David?)
I'm actually thinking about a hack involving passing the PROPPATCH XML in a
get() request, and having the content returned set to the XML which the
server returns. It's programatically simple, and apart from being a bit
unorthordox, it doesn't break any of my fundamental moral principles ;) Plus,
it's a really short patch. Insert this in get(), before the
retrieveContent():
// WebDAV Property Setting support
if ( m_protocol.left(6) == "webdav" && hasMetaData( "davPropPatchXML" ) ) {
m_request.method = DAV_PROPPATCH;
davSetRequest( metaData( "davPropPatchXML" ).utf8() );
}
Cheers,
Hamish.
More information about the kfm-devel
mailing list