cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianugo Rabellino <>
Subject WebDAV proxy available (was: [RT] WebDAV proxy / DASL search in Cocoon)
Date Fri, 29 Aug 2003 17:46:30 GMT
Bertrand Delacretaz wrote:

> If I'm right, this would allow Cocoon to proxy most WebDAV operations to 
> a non-DASL WebDAV backend, and process the few operations that relate to 
> properties (PROPFIND, PROPPATCH, SEARCH) directly, storing properties in 
> a database.

This was an itch I just had to scratch. :-) I have now committed to the 
proxy block a new ProxyGenerator that takes whatever method and forwards 
it to an origin server specified as a sitemap parameter. To do so, I had 
to put together a new httpclient method (I'm wondering if the httpclient 
team might be interested in it once polished...) that clones an incoming 
HttpServletRequest and makes a call to an origin server. So far I've 
tried it with cadaver and skunkdav, surprisingly enough it seems to work 
with all the webdav methods.

We have a starting point then, but beware:

1. header handling is *hacky*. I had to filter by hand some headers in 
order to make the application behave (don't ask me why, but 
Content-Length in the Cocoon proxied response was off by one byte);

2. no HTTP/1.1 keepalive. I see no way of handling it in Cocoon, since 
every request has to go through the pipeline, and the response 
OutputStream cannot be reused. This might be a major performance hit.

Anyway, it's there for you to play. :-) To access a DAV repository 
running at localhost on port 81 under the /dav context, all you have to 
do is

     <map:generator label="content"


     <map:match pattern="dav/">
         <map:generate type="generic-proxy">
           <map:parameter name="url" value="http://localhost:81/dav/"/>
           <map:parameter name="path" value="/dav/"/>
         <map:serialize type="xml"/>

     <map:match pattern="dav/**">
         <map:generate type="generic-proxy">
           <map:parameter name="url" value="http://localhost:8881/dav/"/>
           <map:parameter name="path" value="/dav/{1}"/>
         <map:serialize type="xml"/>

Anyone willing to tackle DASL searches now? :-)


Gianugo Rabellino
Pro-netics s.r.l. -
Orixo, the XML business alliance -
     (Now blogging at:

View raw message