Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-webdav-dev] plugin cannot handle folders without etag [patch]



Alexander,

Thanks for the patches. They should be submitted at attachments to bug
reports since character position, etc is important and they don't work if
they are just cut and pasted into an email.

Specifically, you should enter a bug against Platform/Team for the
team-webdav problems and against Platform/WebDAV for the webdav problems
and attach your patches to the appropriate bug report.

As for current activity, there is currently no work being done on the
webdav plug-in. (as you might have noticed) We have no plans for any work
for this plug-in for Eclipse 3.0 and are happy to accept patches for it.

The team-webdav plug-in is an example plug-in owned by the Platform/Team.
They are currently only doing work on it when required (e.g. bug fixing) so
if you would like to submit a patch for it, then you can do so via bug
reports against the Platform/Team component. If you submit a bug report
with your problem/feature request and in there state that you are willing
to submit a patch for it then you will reduce the risk of duplication of
effort.

Thanks.

                  dj

platform-webdav-dev-admin@xxxxxxxxxxx wrote on 04/06/2004 10:53:25 AM:

> thx for the info.
>
> I appended 2 patches to make this plugin work for apache slide too:
>
> the first patch: patchteam2 (apply to org.eclipse.team.webdav) contains
> a patch for the not provided
> etag bug. I am now using an etag concatenated from the "url + the last
> modified timestamp of the resource".
>
> In addition, the patchteam2 patch contains some fixes that allows one to
> add a site without an empty password.
>
> the second patch: patchdav (apply to org.eclipse.webdav) fixes the
> problem that slide does return an 403 forbidden status code when trying
> to mkcol on the root folder. To go around this I added a check that
> allows forbidden status codes, if the target col  exists & is a
> collection (see the patchdav patch)
>
> Would be nice if you could apply these patches ASAP.
>
> Now that it works with slide & mod_dav & will go on to fix some more
> bugs ;) Please tell me what you want to do next, so we don't duplicate
> effords.
>
>
> Alex
>
> Index: src/org/eclipse/team/internal/webdav/core/Authenticator.java
> ===================================================================
> RCS file: /home/eclipse/org.eclipse.team.
> webdav/src/org/eclipse/team/internal/webdav/core/Authenticator.java,v
> retrieving revision 1.6
> diff -u -r1.6 Authenticator.java
> --- src/org/eclipse/team/internal/webdav/core/Authenticator.java
> 15 Mar 2004 16:02:02 -0000   1.6
> +++ src/org/eclipse/team/internal/webdav/core/Authenticator.java   5
> Apr 2004 21:50:41 -0000
> @@ -110,7 +110,10 @@
>           }
>        }
>
> -      if (username.length() == 0 || password.length() == 0)
> +      // without principal authentication cannot be performed
> +      // without a credential authentication may be useless, but
> +      //     we should not depend on it here anyway!
> +      if (username.length() == 0 /* || password.length()==0 */)
>           return null;
>
>        Hashtable info = new Hashtable(2);
> Index:
src/org/eclipse/team/internal/webdav/core/DavRemoteTargetResource.java
> ===================================================================
> RCS file: /home/eclipse/org.eclipse.team.
> webdav/src/org/eclipse/team/internal/webdav/core/DavRemoteTargetResource.
> java,v
> retrieving revision 1.22
> diff -u -r1.22 DavRemoteTargetResource.java
> ---
> src/org/eclipse/team/internal/webdav/core/DavRemoteTargetResource.
> java   25 Feb 2004 20:35:05 -0000   1.22
> +++
> src/org/eclipse/team/internal/webdav/core/DavRemoteTargetResource.
> java   5 Apr 2004 21:50:41 -0000
> @@ -135,6 +135,10 @@
>        try {
>           PropertyStatus prop =
>              remoteResource.getProperty(WebDAVPropertyNames.
> DAV_GET_LAST_MODIFIED);
> +
> +         if(prop.getStatusCode() == IResponse.SC_NOT_FOUND)
> +            throw new TeamException(ITeamStatusConstants.
> NO_REMOTE_RESOURCE_STATUS);
> +
>           if (prop.getStatusCode() != IResponse.SC_OK)
>              throw new
TeamException(ITeamStatusConstants.IO_FAILED_STATUS);
>           Element value = prop.getProperty();
> Index: src/org/eclipse/team/internal/webdav/core/WebDavProvider.java
> ===================================================================
> RCS file: /home/eclipse/org.eclipse.team.
> webdav/src/org/eclipse/team/internal/webdav/core/WebDavProvider.java,v
> retrieving revision 1.22
> diff -u -r1.22 WebDavProvider.java
> --- src/org/eclipse/team/internal/webdav/core/WebDavProvider.java
> 10 Mar 2003 21:25:31 -0000   1.22
> +++ src/org/eclipse/team/internal/webdav/core/WebDavProvider.java
> 5 Apr 2004 21:50:41 -0000
> @@ -44,6 +44,8 @@
>        // Authentication.
>        String username = site.getUsername();
>        String password = site.getPassword();
> +      if(password == null)
> +         password = "";
>        if ((username != null) && (password != null))
>           httpClient.setAuthenticator(new Authenticator(username,
password));
>
> Index:
>
src/org/eclipse/team/internal/webdav/subscriber/WebDavDeploymentProvider.java

> ===================================================================
> RCS file: /home/eclipse/org.eclipse.team.
>
webdav/src/org/eclipse/team/internal/webdav/subscriber/WebDavDeploymentProvider.

> java,v
> retrieving revision 1.3
> diff -u -r1.3 WebDavDeploymentProvider.java
> ---
> src/org/eclipse/team/internal/webdav/subscriber/WebDavDeploymentProvider.
> java   3 Mar 2004 18:21:04 -0000   1.3
> +++
> src/org/eclipse/team/internal/webdav/subscriber/WebDavDeploymentProvider.
> java   5 Apr 2004 21:50:44 -0000
> @@ -84,7 +84,12 @@
>        // Authentication.
>        String username = site.getUsername();
>        String password = site.getPassword();
> -      if ((username != null) && (password != null))
> +
> +      // make the password always at least empty
> +      if (password == null)
> +         password = "";
> +
> +      if (username != null && password!=null)
>           httpClient.setAuthenticator(new Authenticator(username,
password));
>
>        // Proxy server.
> Index:
>
src/org/eclipse/team/internal/webdav/subscriber/WebDavSubscriberResource.java

> ===================================================================
> RCS file: /home/eclipse/org.eclipse.team.
>
webdav/src/org/eclipse/team/internal/webdav/subscriber/WebDavSubscriberResource.

> java,v
> retrieving revision 1.4
> diff -u -r1.4 WebDavSubscriberResource.java
> ---
> src/org/eclipse/team/internal/webdav/subscriber/WebDavSubscriberResource.
> java   15 Mar 2004 16:02:02 -0000   1.4
> +++
> src/org/eclipse/team/internal/webdav/subscriber/WebDavSubscriberResource.
> java   5 Apr 2004 21:50:44 -0000
> @@ -56,6 +56,19 @@
>        try {
>           PropertyStatus prop =
>              remote.getProperty(WebDAVPropertyNames.DAV_GET_E_TAG);
> +
> +         if (prop.getStatusCode() == IResponse.SC_NOT_FOUND) {
> +            // some webdav implementors allow collection nodes to not
contain
> +            // an etag. In this case we assume that no version info is
> +            // managed in that webdav server and so we make this
> +            // resource either exist or not, by using a virtual etag of
> +            // the uri. If the resource does not exit, we
> +            // will go for the default catch rule below,
> +            // throwing a TeamException
> +            if(remote.exists())
> +               return remote.getLocator().getResourceURL().
> toString().getBytes();
> +               //return "".getBytes();
> +         }
>           if (prop.getStatusCode() != IResponse.SC_OK)
>              throw new
TeamException(ITeamStatusConstants.IO_FAILED_STATUS);
>           Element value = prop.getProperty();
> Index: src/client/org/eclipse/webdav/client/CollectionHandle.java
> ===================================================================
> RCS file: /home/eclipse/org.eclipse.
> webdav/src/client/org/eclipse/webdav/client/CollectionHandle.java,v
> retrieving revision 1.10
> diff -u -r1.10 CollectionHandle.java
> --- src/client/org/eclipse/webdav/client/CollectionHandle.java   10
> Mar 2003 21:56:11 -0000   1.10
> +++ src/client/org/eclipse/webdav/client/CollectionHandle.java   5
> Apr 2004 21:51:06 -0000
> @@ -206,6 +206,13 @@
>              if (handle.isCollection())
>                 return;
>           }
> +
> +         if (status == IResponse.SC_FORBIDDEN) {
> +            // if this is a collection & exists return
> +            if (handle.isCollection() && handle.exists())
> +               return;
> +         }
> +
>           if (status == IResponse.SC_CONFLICT) {
>              // close the response and try to create the parents
>              closeResponse(response);



Back to the top