webdav search

Best, Jan-Pascal van j.p.vanbest at tbm.tudelft.nl
Thu May 2 10:36:35 BST 2002


Hi Hamish,

> 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

Not really, but I'll look it up. It's actually implemented from a
Microsoft
spec on how to access their Exchange 2000 server using webdav. This can
be found in the documentation delivered with the Exchange 200 SDK:

http://msdn.microsoft.com/downloads/default.asp?URL=/downloads/sample.as
p?url=/msdn-files/027/001/834/msdncompositedoc.xml

or 

http://download.microsoft.com/download/exchplatinumbeta/SDK/March_2002/N
T5/EN-US/ExchangeSDKDocs.exe

In the Exchange version, the query is expressed in SQL and incorporated
directly into the XML query. The internet draft, however, defines its
own
query language, which looks like XML-ized SQL. Because the query is
supplied by the application, this shouldn't matter too much. I'll see
what other parts of the standard apply to the kdelibs webdav search
implementation.

> 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?
Sounds like a good idea, I'll try to whip my patch into this new shape.

> >- 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?
For the exchange server, it make sure that the GET method on a calendar
item returns an iCalender record in a MIME message, instead of an HTML
form. Here:
http://www.sambar.com/syshelp/webdav.htm
it says that the translate header is a Microsoft invention to get the
source of a script instead of its output.

I guess this should be made into a metadata option, too.

> >- 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.

OK.

Cheers,

Jan-Pascal

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3858 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20020502/15a56034/attachment.bin>


More information about the kfm-devel mailing list