Monitoring and PROPFIND
Table of Contents
Monitoring the WebDAV exchange
note
We assume you have cocoon HEAD version of the cocoon-2.1.x branch
set to be your $COCOON_HOME!
If you are using 2.0.x and using the
default settings then
$COCOON_HOME=$LENYA_HOME/external/cocoon_2_1_x
cd $COCOON_HOME java -cp lib/optional/axis-1.3.jar org.apache.axis.utils.tcpmon Enter "Listen Port# 3333" for instance Select "Act as a... Listener" Enter "Target Hostname: localhost" for instance Enter "Target Port# 8888" for instance Click "Add" and a new tab saying "3333" should show up Click on this new tab to view the requests and responses Enter within your favorite webDAV client "http://localhost:3333/default/webdav".
PROPFIND
The WebDAV client will first send a PROPFIND with Depth = 0. Depending on the response (collection or resource) the WebDAV client will send another PROPFIND with Depth = 1 (collection) or a GET (resource).
Collection:
Request ======= PROPFIND /lenya/blog/authoring/entries/2003/08/24/peanuts/ HTTP/1.1 Pragma: no-cache Cache-control: no-cache Accept: text/*, image/jpeg, image/png, image/*, */* Accept-Encoding: x-gzip, gzip, identity Accept-Charset: iso-8859-1, utf-8;q=0.5, *;q=0.5 Accept-Language: en Host: 127.0.0.1 Depth: 0 Response ======== HTTP/1.1 207 Multi-Status X-Cocoon-Version: 2.1 Set-Cookie: JSESSIONID=320E3B1395B867B5BC42B5FC93457C36; Path=/lenya Content-Type: text/xml Transfer-Encoding: chunked Date: Mon, 25 Aug 2003 14:27:12 GMT Server: Apache Coyote/1.0 <?xml version="1.0" encoding="UTF-8"?> <D:multistatus xmlns:D="DAV:"> <D:response xmlns:lp1="DAV:" xmlns:lp2="http://apache.org/dav/props/"> <D:href>/lenya/blog/authoring/entries/2003/08/24/peanuts/</D:href> <D:propstat> <D:prop> <lp1:resourcetype><D:collection/></lp1:resourcetype> <D:getcontenttype>httpd/unix-directory</D:getcontenttype> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> </D:multistatus> Request ======= PROPFIND /lenya/blog/authoring/entries/2003/08/24/peanuts/ HTTP/1.1 Pragma: no-cache Cache-control: no-cache Accept: text/*, image/jpeg, image/png, image/*, */* Accept-Encoding: x-gzip, gzip, identity Accept-Charset: iso-8859-1, utf-8;q=0.5, *;q=0.5 Accept-Language: en Host: 127.0.0.1 Depth: 1 Response ======== HTTP/1.1 207 Multi-Status X-Cocoon-Version: 2.1 Set-Cookie: JSESSIONID=5A87A774B7B29D04DEDBDECC54477E5B; Path=/lenya Content-Type: text/xml Transfer-Encoding: chunked Date: Mon, 25 Aug 2003 14:27:12 GMT Server: Apache Coyote/1.0 <?xml version="1.0" encoding="UTF-8"?> <D:multistatus xmlns:D="DAV:"> <D:response xmlns:lp1="DAV:" xmlns:lp2="http://apache.org/dav/props/"> <D:href>/lenya/blog/webdav/entries/2003/08/24/peanuts/index.html</D:href> <D:propstat> <D:prop> <lp1:resourcetype/> <D:getcontenttype>text/html</D:getcontenttype> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> <D:response xmlns:lp1="DAV:" xmlns:lp2="http://apache.org/dav/props/"> <D:href>/lenya/blog/webdav/entries/2003/08/24/peanuts/charlie.xml</D:href> <D:propstat> <D:prop> <lp1:resourcetype/> <lp1:creationdate>2003-07-21T13:04:23Z</lp1:creationdate> <lp1:getcontentlength>3845</lp1:getcontentlength> <D:getcontenttype>text/xml</D:getcontenttype> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> </D:multistatus>
PUT
The WebDAV client will send a PUT in order to copy a document onto the server.
Request ======= PUT /lenya/blog/webdav/entries/2003/08/29/levi/index.xml HTTP/1.1 Host: 127.0.0.1 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030507 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Content-Type: text/xml Content-Length: 1641 Cookie: JSESSIONID=1CF7F4C27B737E3603FFC2D4D4C137CE <?xml version="1.0" encoding="UTF-8"?> <echo:entry xmlns:echo="http://example.com/newformat#" xmlns:ent="http://www.purl.org/NET/ENT/1.0/" version="1.0"> <echo:title>Lenya</echo:title> <echo:created>2003-08-29T01:46:45</echo:created> <echo:issued>2003-08-29T01:46:45</echo:issued> <echo:modified>2003-08-29T01:46:45</echo:modified> <echo:content mode="escaped" type="text/plain" lang="en-us"> Plain Text </echo:content> <ent:topic id="introductory">Hello</ent:topic> </echo:entry> Response ======== HTTP/1.1 204 No Content Date: Mon, 18 Aug 2003 14:22:47 GMT Server: Apache/2.0.46 (Unix) DAV/2 Content-Length: 0 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/xml