gcasper 2003/12/17 05:42:14
Modified: src/blocks/webdav/java/org/apache/cocoon/components/source/impl
WebDAVSource.java
Log:
Interoperability with mod_dav
Revision Changes Path
1.14 +11 -2
cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java
Index: WebDAVSource.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- WebDAVSource.java 23 Nov 2003 04:30:52 -0000 1.13
+++ WebDAVSource.java 17 Dec 2003 13:42:14 -0000 1.14
@@ -205,9 +205,18 @@
/**
* Constructor used by the Traversable methods to build children.
*/
- private WebDAVSource (WebdavResource source) {
+ private WebDAVSource (WebdavResource source)
+ throws HttpException, IOException {
this.resource = source;
this.systemId = source.getHttpURL().getURI();
+
+ //fix trailing slash
+ if (this.resource.isCollection() && (this.systemId.endsWith("/") ==
false)) {
+ this.systemId = this.systemId+"/";
+ HttpURL httpURL = new HttpURL(this.systemId);
+ httpURL.setUserInfo(this.principal, this.password);
+ this.resource.setHttpURL(httpURL);
+ }
}
/**