webdav search

Hamish Rodda meddie at yoyo.its.monash.edu.au
Sat Apr 27 06:59:07 BST 2002


Hi Jan-Pascal,

>From the kdepim/korganizer context, I've been working on
>support for exchange 2000 calendar servers with webdav.
>I'm made some changes to my local kdelibs tree which I think
>could be useful for more people.
>
>At the end of this message is a patch to http.c/http.h that
>- implements a davSearch() method
>- implements the SEARCH function as a special().

I wasn't aware of this (new) method until now. I take it this is the spec: 
http://greenbytes.de/tech/webdav/draft-reschke-webdav-search-latest.html

Your patch looks interesting. There's quite a bit of code duplication though, 
and I'm wondering if it wouldn't be easier to add this to the listdir() 
method via an additional kio metadata flag (maybe "davSearchQuery"). That 
would remove the necessity for SearchJob (which only has utility for webdav), 
and the duplicated propstat parsing code.

So, the usage would be:

StatJob *job= KIO::stat(...);
job->addMetaData("davSearchQuery", "<your seach string or xml here>");

The davStatList() function would detect this metadata and switch from calling 
a PROPSTAT to a SEARCH, using the specified query. What do you think?

>- adds a "translate: f" header flag for all webdav GETs. This should
>be an option of some kind, but i don't know how and where. Any
>ideas?

What does this accomplish / in which specification is this documented?

>- add a content-type: text/xml for dav search in httpOpen().
>I guess this should be done somewhere else, but I don't know
>where. I've tried an addMetadata() in davSearch, but that
>didn't work

I think if davData is set to true, the content type and charset should be set 
as you have done for the search method, as this applies to all occasions in 
which davData is used.

>- do not finish the header when there is still davData to send (this
>fixes a bug that just hasn't shown up yet)

Looks correct, I didn't test that thoroughly (haven't worked out how to expose 
the locking code to the gui yet).

Cheers,

Hamish.




More information about the kfm-devel mailing list