On 26 Nov 2003, at 15:24, Wallmer, Martin wrote:

Hi Stefano,

I never used slide client nor know its sources. I think there is work to be
done connecting the client SEARCH to server SEARCH. AFAIK the SEARCH in
client somehow filters the result of a PROPFIND.

Is there anybody who can volunteer in mapping the client SEARCH to server
SEARCH?

Martin,

the client library might not be perfect, but I'm much more concerned with the server side bugs that I found. Look at this HTTP trace

SEARCH /files/ HTTP/1.1
Content-Type: text/xml; charset=utf-8
User-Agent: Jakarta Commons-HttpClient/2.0rc1
Host: localhost:4000
Content-Length: 589


<?xml version="1.0" encoding="ISO-8859-1"?> <d:searchrequest xmlns:d="DAV:"> <d:basicsearch> <d:select> <d:allprop/> </d:select> <d:from> <d:scope> <d:href>/files/</d:href> <d:depth>infinity</d:depth> </d:scope> </d:from> <d:where> <d:eq> <d:prop> <doco:published xmlns:doco="http://apache.org/cocoon/doco/1.0"/> </d:prop> <d:literal>true</d:literal> </d:eq> </d:where> <d:orderby> <d:prop> <d:modificationdate/> </d:prop> <d:ascending/> </d:orderby> </d:basicsearch> </d:searchrequest>

HTTP/1.1 207 Multi Status
Date: Wed, 26 Nov 2003 18:38:15 GMT
Server: Jetty/4.2.14rc1 (Mac OS X/10.3.1 ppc java/1.4.2_01)
Content-Type: text/xml; charset="UTF-8"

<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>/history/1/1.0</D:href>
<D:propstat>
<D:prop>
<B:published xmlns:B="http://apache.org/cocoon/doco/1.0";>true</B:published>
<D:displayname>document.xml</D:displayname>
<D:source />
<D:getlastmodified>Wed, 26 Nov 2003 18:36:55 GMT</D:getlastmodified>
<D:getcontentlength>3428</D:getcontentlength>
<D:resourcetype />
<D:getcontenttype>text/xml</D:getcontenttype>
<D:getcontentlanguage>en</D:getcontentlanguage>
<D:creationdate>2003-11-26T18:36:55Z</D:creationdate>
<D:lockdiscovery />
<D:supportedlock>
<D:lockentry>
<D:lockscope>
<D:exclusive />
</D:lockscope>
<D:locktype>
<D:write />
</D:locktype>
</D:lockentry>
<D:lockentry>
<D:lockscope>
<D:shared />
</D:lockscope>
<D:locktype>
<D:write />
</D:locktype>
</D:lockentry>
</D:supportedlock>
<D:getetag>07a154c55beb9b7ad2bc43fbf470d7f2</D:getetag>
<D:modificationdate>2003-11-26T18:36:55Z</D:modificationdate>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>

there are three big problems, as I said:

1) the scope is not used (otherwise, I wouldn't get /history/* in the results)
2) there are other files (not under version control) in /files/ that have the "published" property set but don't show up

Also, if you change the scope you get an error:

SEARCH /files/news/ HTTP/1.1
Content-Type: text/xml; charset=utf-8
User-Agent: Jakarta Commons-HttpClient/2.0rc1
Host: localhost:4000
Content-Length: 594


<?xml version="1.0" encoding="ISO-8859-1"?> <d:searchrequest xmlns:d="DAV:"> <d:basicsearch> <d:select> <d:allprop/> </d:select> <d:from> <d:scope> <d:href>/files/news/</d:href> <d:depth>infinity</d:depth> </d:scope> </d:from> <d:where> <d:eq> <d:prop> <doco:published xmlns:doco="http://apache.org/cocoon/doco/1.0"/> </d:prop> <d:literal>true</d:literal> </d:eq> </d:where> <d:orderby> <d:prop> <d:modificationdate/> </d:prop> <d:ascending/> </d:orderby> </d:basicsearch> </d:searchrequest>

HTTP/1.1 400 Bad Request
Date: Wed, 26 Nov 2003 18:42:43 GMT
Server: Jetty/4.2.14rc1 (Mac OS X/10.3.1 ppc java/1.4.2_01)
Content-Type: text/xml; charset="UTF-8"

<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href></D:href>
<D:status>HTTP/1.1 404 Not Found</D:status>
<D:responsedescription>scope /news/ is invalid</D:responsedescription>
<D:scopeerror />
</D:response>
</D:multistatus>

"scope /news/ is invalid" shows pretty evidently there is a bug in the way the scope is handled, I think I spot something in the SearchMethod.java class, I'll investigate further. In the meanwhile, suggestions are appreciated.

--
Stefano.

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Reply via email to