You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Ingo Brunberg <ib...@fiz-chemie.de> on 2003/02/17 14:30:07 UTC

Proxy support in WebDAV client and patch

Hi Slide developers,

although most contributions to Slide seem to be ignored, I am now
trying it again. I hope there is still at least one active commiter
who is interested in the client side.

Here are patches for WebdavResource.java and WebdavSession.java which
address the following issues:

- Modify WebdavSession.java to allow for proxied https.
- Add some constructors to WebdavResource.java to make using a proxy
  easier. Of course one could add even more constructors.
- Do not do a refresh() on a WebdavResource after its target has been
  deleted.
- Fix HttpURL for a WebdavResource after applying the MoveMethod
  before calling refresh().
- Add an additional labelMethod, which takes a destination path as a
  parameter.

This is a compilation of issues that came up on the developer and the
user list in the past weeks. Note that these changes are minimal and I
have tested them and they work.

An important thing still missing from these patches is the wrong
charset encoding used by most of the WebDAV methods. Rob Owen has
described those problems and sent patches to this list, too. Please pay
more attention to these kind of posts!!!

Thanks,
Ingo


Index: src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java
===================================================================
RCS file: /home/cvspublic/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java,v
retrieving revision 1.55
diff -u -r1.55 WebdavResource.java
--- src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java	7 Feb 2003 14:58:57 -0000	1.55
+++ src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java	17 Feb 2003 12:50:09 -0000
@@ -293,6 +293,24 @@
 
     /**
      * The constructor.
+     *
+     * @param httpURL The specified http URL.
+     * @param proxyHost The hostname of the proxy to use.
+     * @param proxyPort The port number of the proxy to use.
+     * @exception HttpException
+     * @exception IOException
+     * @see #setDefaultAction(int)
+     */
+    public WebdavResource(HttpURL httpURL, String proxyHost, int proxyPort)
+        throws HttpException, IOException {
+
+        setProxy(proxyHost, proxyPort);
+        setHttpURL(httpURL);
+    }
+
+
+    /**
+     * The constructor.
      * It must be put an escaped http URL as an arguement.
      *
      * @param escapedHttpURL The escaped http URL string.
@@ -309,6 +327,25 @@
 
     /**
      * The constructor.
+     * It must be put an escaped http URL as an arguement.
+     *
+     * @param escapedHttpURL The escaped http URL string.
+     * @param proxyHost The hostname of the proxy to use.
+     * @param proxyPort The port number of the proxy to use.
+     * @exception HttpException
+     * @exception IOException
+     * @see #setDefaultAction(int)
+     */
+    public WebdavResource(String escapedHttpURL, String proxyHost,
+                          int proxyPort) throws HttpException, IOException {
+
+        setProxy(proxyHost, proxyPort);
+        setHttpURL(escapedHttpURL);
+    }
+
+
+    /**
+     * The constructor.
      *
      * @param httpURL The http URL.
      * @param additionalPath The added relative path.
@@ -2613,6 +2650,15 @@
     public boolean labelMethod(String labelname, int type)
         throws HttpException, IOException
     {
+        return labelMethod(httpURL.getPath(), labelname, type);
+    }
+
+    /**
+     * Execute a LABEL method on the given path, setting the given label
+     */
+    public boolean labelMethod(String path, String labelname, int type)
+        throws HttpException, IOException
+    {
         int labeltype=0;
 
         switch(type) {
@@ -2628,8 +2674,7 @@
         }
 
         setClient();
-        LabelMethod method = new LabelMethod(httpURL.getPath(), labeltype,
-                labelname);
+        LabelMethod method = new LabelMethod(path, labeltype, labelname);
 
         int statusCode = client.executeMethod(method);
 
@@ -3389,7 +3434,6 @@
         throws HttpException, IOException {
 
         boolean result = deleteMethod(httpURL.getPath());
-        if (result) refresh();
 
         return result;
     }
@@ -3427,9 +3471,12 @@
     public boolean moveMethod(String destination)
         throws HttpException, IOException {
 
-        boolean result = moveMethod(httpURL.getPath(),
-                                    HttpURL.getPath(destination));
-        if (result) refresh();
+        String destinationPath = HttpURL.getPath(destination);
+        boolean result = moveMethod(httpURL.getPath(), destinationPath);
+        if (result) {
+			httpURL.setPath(destinationPath);
+            refresh();
+        }
 
         return result;
     }

Index: src/webdav/client/src/org/apache/webdav/lib/WebdavSession.java
===================================================================
RCS file: /home/cvspublic/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavSession.java,v
retrieving revision 1.25
diff -u -r1.25 WebdavSession.java
--- src/webdav/client/src/org/apache/webdav/lib/WebdavSession.java	16 Dec 2002 15:17:29 -0000	1.25
+++ src/webdav/client/src/org/apache/webdav/lib/WebdavSession.java	17 Feb 2003 12:50:38 -0000
@@ -185,7 +185,8 @@
             client.setState(new WebdavState());
             if(proxyHost != null && proxyPort > 0)
                 client.startSession(httpURL.getHost(), httpURL.getPort(),
-                        proxyHost, proxyPort);
+                        proxyHost, proxyPort,
+                        httpURL.getEscapedHttpURL().startsWith("https"));
             else    
 			    client.startSession(httpURL.getHost(), httpURL.getPort(),
                         httpURL.getEscapedHttpURL().startsWith("https"));


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: Proxy support in WebDAV client and patch

Posted by Ingo Brunberg <ib...@fiz-chemie.de>.
Hi Remy,

as I have got the impression that there are many important bugfixes
lying around and nobody seems to care about, I would be willing to
become a committer.

IMHO, in any case something has to be done. It's a pity seeing people
submitting bug reports and patches and being completely ignored.

Regards,
Ingo

> Ingo Brunberg wrote:
> > Hi Slide developers,
> > 
> > although most contributions to Slide seem to be ignored, I am now
> > trying it again. I hope there is still at least one active commiter
> > who is interested in the client side.
> 
> The problem is that a number of committers which were very active in the 
> past are now unactive or simply don't have time right now.
> This could be resolved by electing new committers (such as you and/or 
> Rob) :)
> 
> Remy


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: Proxy support in WebDAV client and patch

Posted by Remy Maucherat <re...@apache.org>.
Ingo Brunberg wrote:
> Hi Slide developers,
> 
> although most contributions to Slide seem to be ignored, I am now
> trying it again. I hope there is still at least one active commiter
> who is interested in the client side.

The problem is that a number of committers which were very active in the 
past are now unactive or simply don't have time right now.
This could be resolved by electing new committers (such as you and/or 
Rob) :)

Remy


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: [DRAFT] [PROPOSAL] Slide and JSR 170

Posted by Michael Wechner <mi...@wyona.org>.
Remy Maucherat wrote:
> Hi all,
> 
> This is a post about starting a proposal which goal would be to refactor 
> Slide using the JSR 170 specification (which is currently under work at 
> the JCP; http://www.jcp.org/en/jsr/detail?id=170). That proposal would 
> be used as the Reference Implementation for the JSR.
> 
> The general architecture would be:
> - WebDAV powered JSR 170 client API
> - WebDAV server layer, using JSR 170 API
> - Slide core, providing a JSR 170 API
> 
> The goals of this proposal would be:
> - Provide an OSS implementation of JSR 170.
> - Provide implementation feedback to the JSR 170 expert group, allowing 
> to enhance the specification and fix problems (that's the usual role of 
> a RI).
> - Provide a more modular architecture for Slide, with the goal of 
> adopting it for Slide 3.x (as with all revolution style proposals, this 
> will of course be subject to a majority vote by all Slide committers, 
> when the proposal is considered to be ready). The WebDAV layer would be 
> able to function on top of another JSR 170 compliant repository, and 
> applications using JSR 170 would be able to use either Slide or WebDAV 
> as their backend.
> 
> Sponsors of the proposal include:
> - DAY Software: Day will donate a first draft implementation (largely 
> based on the current Slide 2.x code) to the ASF, and will contribute 
> engineering resources to the development of the proposal. A developer 
> from DAY will be proposed as a committer to allow him to devlop the 
> proposal (with more being elected as needed according to merit, as usual).
> - OpenCMS: Plans to adopt Slide as its underlying repository, and will 
> contribute engineering resources to the development of the proposal.
> 
> The proposal will be of course developed independently of the Slide 1.x 
> and Slide 2.x codebases.
> 
> Comments / Ideas ?

I am not sure if you are aware of our proposal for Lenya, a Cocoon 
subproject (via Incubator):

http://www.mail-archive.com/general@incubator.apache.org/msg00062.html

Since Stephan Michels has already started some time ago an 
implementation of Slide into Cocoon, we should also be able to
use Slide together with Lenya and contribute engineering resources to 
Slide (plz see our roadmap http://www.wyona.org/roadmap.html)

BTW: we are organizing a local OSCOM sprint event during mid march at 
Zurich/Switzerland and David Nuescheler might join us. Plz see our 
announcement:

http://blog.oscom.org/archive/000021.html


Michael


> Remy
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: [DRAFT] [PROPOSAL] Slide and JSR 170

Posted by Remy Maucherat <re...@apache.org>.
Michael Smith wrote:
> Remy Maucherat wrote:
> 
>> Hi all,
>>
>> This is a post about starting a proposal which goal would be to 
>> refactor Slide using the JSR 170 specification (which is currently 
>> under work at the JCP; http://www.jcp.org/en/jsr/detail?id=170). That 
>> proposal would be used as the Reference Implementation for the JSR.
>>
>> The general architecture would be:
>> - WebDAV powered JSR 170 client API
>> - WebDAV server layer, using JSR 170 API
>> - Slide core, providing a JSR 170 API
>>
>> The goals of this proposal would be:
>> - Provide an OSS implementation of JSR 170.
>> - Provide implementation feedback to the JSR 170 expert group, 
>> allowing to enhance the specification and fix problems (that's the 
>> usual role of a RI).
>> - Provide a more modular architecture for Slide, with the goal of 
>> adopting it for Slide 3.x (as with all revolution style proposals, 
>> this will of course be subject to a majority vote by all Slide 
>> committers, when the proposal is considered to be ready). The WebDAV 
>> layer would be able to function on top of another JSR 170 compliant 
>> repository, and applications using JSR 170 would be able to use either 
>> Slide or WebDAV as their backend.
>>
>> Sponsors of the proposal include:
>> - DAY Software: Day will donate a first draft implementation (largely 
>> based on the current Slide 2.x code) to the ASF, and will contribute 
>> engineering resources to the development of the proposal. A developer 
>> from DAY will be proposed as a committer to allow him to devlop the 
>> proposal (with more being elected as needed according to merit, as 
>> usual).
>> - OpenCMS: Plans to adopt Slide as its underlying repository, and will 
>> contribute engineering resources to the development of the proposal.
>>
>> The proposal will be of course developed independently of the Slide 
>> 1.x and Slide 2.x codebases.
>>
>> Comments / Ideas ?
>>
>> Remy
> 
> 
> Remy,
> 
> This sounds great. Do we need to vote on this proposal at this time? 
> It's not entirely clear from your email. Anyway, a JSR170 implementation 
> would be a very useful thing for slide to have.

No vote is actually required for a committer to start a proposal, but 
it's quite rude ;-)

Remy


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: [DRAFT] [PROPOSAL] Slide and JSR 170

Posted by Michael Smith <ms...@speedlegal.com>.
Remy Maucherat wrote:
> Hi all,
> 
> This is a post about starting a proposal which goal would be to refactor 
> Slide using the JSR 170 specification (which is currently under work at 
> the JCP; http://www.jcp.org/en/jsr/detail?id=170). That proposal would 
> be used as the Reference Implementation for the JSR.
> 
> The general architecture would be:
> - WebDAV powered JSR 170 client API
> - WebDAV server layer, using JSR 170 API
> - Slide core, providing a JSR 170 API
> 
> The goals of this proposal would be:
> - Provide an OSS implementation of JSR 170.
> - Provide implementation feedback to the JSR 170 expert group, allowing 
> to enhance the specification and fix problems (that's the usual role of 
> a RI).
> - Provide a more modular architecture for Slide, with the goal of 
> adopting it for Slide 3.x (as with all revolution style proposals, this 
> will of course be subject to a majority vote by all Slide committers, 
> when the proposal is considered to be ready). The WebDAV layer would be 
> able to function on top of another JSR 170 compliant repository, and 
> applications using JSR 170 would be able to use either Slide or WebDAV 
> as their backend.
> 
> Sponsors of the proposal include:
> - DAY Software: Day will donate a first draft implementation (largely 
> based on the current Slide 2.x code) to the ASF, and will contribute 
> engineering resources to the development of the proposal. A developer 
> from DAY will be proposed as a committer to allow him to devlop the 
> proposal (with more being elected as needed according to merit, as usual).
> - OpenCMS: Plans to adopt Slide as its underlying repository, and will 
> contribute engineering resources to the development of the proposal.
> 
> The proposal will be of course developed independently of the Slide 1.x 
> and Slide 2.x codebases.
> 
> Comments / Ideas ?
> 
> Remy

Remy,

This sounds great. Do we need to vote on this proposal at this time? 
It's not entirely clear from your email. Anyway, a JSR170 implementation 
would be a very useful thing for slide to have.

Mike



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


Re: [DRAFT] [PROPOSAL] Slide and JSR 170

Posted by Lolo <lo...@lolo3d.ods.org>.
where we can find the api specification of the jsr ?


On Mon, 2003-02-17 at 15:25, Remy Maucherat wrote:
> Hi all,
> 
> This is a post about starting a proposal which goal would be to refactor 
> Slide using the JSR 170 specification (which is currently under work at 
> the JCP; http://www.jcp.org/en/jsr/detail?id=170). That proposal would 
> be used as the Reference Implementation for the JSR.
> 
> The general architecture would be:
> - WebDAV powered JSR 170 client API
> - WebDAV server layer, using JSR 170 API
> - Slide core, providing a JSR 170 API
> 
> The goals of this proposal would be:
> - Provide an OSS implementation of JSR 170.
> - Provide implementation feedback to the JSR 170 expert group, allowing 
> to enhance the specification and fix problems (that's the usual role of 
> a RI).
> - Provide a more modular architecture for Slide, with the goal of 
> adopting it for Slide 3.x (as with all revolution style proposals, this 
> will of course be subject to a majority vote by all Slide committers, 
> when the proposal is considered to be ready). The WebDAV layer would be 
> able to function on top of another JSR 170 compliant repository, and 
> applications using JSR 170 would be able to use either Slide or WebDAV 
> as their backend.
> 
> Sponsors of the proposal include:
> - DAY Software: Day will donate a first draft implementation (largely 
> based on the current Slide 2.x code) to the ASF, and will contribute 
> engineering resources to the development of the proposal. A developer 
> from DAY will be proposed as a committer to allow him to devlop the 
> proposal (with more being elected as needed according to merit, as usual).
> - OpenCMS: Plans to adopt Slide as its underlying repository, and will 
> contribute engineering resources to the development of the proposal.
> 
> The proposal will be of course developed independently of the Slide 1.x 
> and Slide 2.x codebases.
> 
> Comments / Ideas ?
> 
> Remy
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
-- 
Lolo <lo...@lolo3d.ods.org>


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org


[DRAFT] [PROPOSAL] Slide and JSR 170

Posted by Remy Maucherat <re...@apache.org>.
Hi all,

This is a post about starting a proposal which goal would be to refactor 
Slide using the JSR 170 specification (which is currently under work at 
the JCP; http://www.jcp.org/en/jsr/detail?id=170). That proposal would 
be used as the Reference Implementation for the JSR.

The general architecture would be:
- WebDAV powered JSR 170 client API
- WebDAV server layer, using JSR 170 API
- Slide core, providing a JSR 170 API

The goals of this proposal would be:
- Provide an OSS implementation of JSR 170.
- Provide implementation feedback to the JSR 170 expert group, allowing 
to enhance the specification and fix problems (that's the usual role of 
a RI).
- Provide a more modular architecture for Slide, with the goal of 
adopting it for Slide 3.x (as with all revolution style proposals, this 
will of course be subject to a majority vote by all Slide committers, 
when the proposal is considered to be ready). The WebDAV layer would be 
able to function on top of another JSR 170 compliant repository, and 
applications using JSR 170 would be able to use either Slide or WebDAV 
as their backend.

Sponsors of the proposal include:
- DAY Software: Day will donate a first draft implementation (largely 
based on the current Slide 2.x code) to the ASF, and will contribute 
engineering resources to the development of the proposal. A developer 
from DAY will be proposed as a committer to allow him to devlop the 
proposal (with more being elected as needed according to merit, as usual).
- OpenCMS: Plans to adopt Slide as its underlying repository, and will 
contribute engineering resources to the development of the proposal.

The proposal will be of course developed independently of the Slide 1.x 
and Slide 2.x codebases.

Comments / Ideas ?

Remy


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org