On Thu, 2007-05-24 at 09:23 +0200, Edi Weitz wrote:
On Wed, 23 May 2007 18:35:49 +0200, Ralf Mattes rm@seid-online.de wrote:
A PROPGET for all properties of a resource
I assume you mean PROPFIND.
Sorry, yes - I'm testing with cadaver whose PROPFIND command is called 'propget'.
will result in a call to 'collect-all-properties' that will call 'all-property-designators' which will result (at the end of a long call chain) in a call to 'get-dead-properties'. After that the same 'get-dead-properties' is called for each property again.
No. GET-DEAD-PROPERTIES is called once for each /resource/ (not property) if the "Depth" header is not 0 - see transcript below. This has to be done because each resource can have a different set of dead properties. At least that's how I'm reading the spec.
There's nothing wrong with your transcript but it doesn't seem to contradict what I reported. What I observe is that 'get-dead-properties' gets called once for the resource and once for each property. Now, unless you magically did add some properties to 'foo' and 'bar' you can't observe this ... ;-)
Cheers, RalfD
Now, according to the documentation 'get-dead-properties' is supposed to return _all_ dead properties so it looks as if we do some extra work here ;-)
I don't think so.
Cheers, Edi.
CL-USER 1 > (defmethod print-object ((resource dav:file-resource) stream) ;; for the TRACE output (print-unreadable-object (resource stream :type t) (format stream " ~S" (dav::resource-name resource)))) #<STANDARD-METHOD PRINT-OBJECT NIL (CL-WEBDAV:FILE-RESOURCE T) 200BDDEF>
CL-USER 2 > (merge-pathnames "test/*.*" dav:*file-resource-base-path-namestring*) #P"c:/tmp/test/*.*"
CL-USER 3 > (directory *) (#P"c:/tmp/test/foo" #P"c:/tmp/test/bar")
CL-USER 4 > (push (dav:create-dav-dispatcher 'dav:file-resource) tbnl:*dispatch-table*) (#<Closure ((METHOD CL-WEBDAV:CREATE-DAV-DISPATCHER (SYMBOL)) . 1) 200F6252> HUNCHENTOOT:DEFAULT-DISPATCHER)
CL-USER 5 > (trace dav::get-dead-properties) (CL-WEBDAV:GET-DEAD-PROPERTIES)
CL-USER 6 > (tbnl:start-server :port 4242) #<HUNCHENTOOT::SERVER 20090CFB>
CL-USER 7 > (nth-value 1 (drakma:http-request "http://localhost:4242/test/" :method :propfind :additional-headers '(("Depth" . "1")))) 207
CL-USER 8 > (nth-value 1 (drakma:http-request "http://localhost:4242/test/" :method :propfind :additional-headers '(("Depth" . "0")))) 207
For the first request, the TRACE window looks like this:
0 CL-WEBDAV:GET-DEAD-PROPERTIES > ... >> CL-WEBDAV:RESOURCE : #<CL-WEBDAV:FILE-RESOURCE "test"> 0 CL-WEBDAV:GET-DEAD-PROPERTIES < ... << VALUE-0 : NIL << VALUE-1 : NIL 0 CL-WEBDAV:GET-DEAD-PROPERTIES > ... >> CL-WEBDAV:RESOURCE : #<CL-WEBDAV:FILE-RESOURCE "foo"> 0 CL-WEBDAV:GET-DEAD-PROPERTIES < ... << VALUE-0 : NIL << VALUE-1 : NIL 0 CL-WEBDAV:GET-DEAD-PROPERTIES > ... >> CL-WEBDAV:RESOURCE : #<CL-WEBDAV:FILE-RESOURCE "bar"> 0 CL-WEBDAV:GET-DEAD-PROPERTIES < ... << VALUE-0 : NIL << VALUE-1 : NIL
For the second request, the TRACE window looks like this:
0 CL-WEBDAV:GET-DEAD-PROPERTIES > ... >> CL-WEBDAV:RESOURCE : #<CL-WEBDAV:FILE-RESOURCE "test"> 0 CL-WEBDAV:GET-DEAD-PROPERTIES < ... << VALUE-0 : NIL << VALUE-1 : NIL