Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0
-
Fix Version/s: 1.1
-
Component/s: WebDAV Interface
-
Labels:None
-
Number of attachments :3
Description
The goal is to move files from one repo to another through the webdav interface, using a webdav client, like Windows My Network Places or BitKinex
Two repos where created and accessed with username/password
http://localhost:8092/repository/repo1
http://localhost:8092/repository/repo2
Copying from one to another fails.
Copying from any other webdav server to them works
Copying from them to any other webdav server works
Copying from local to them and from them to local of course works
I tried with latest svn code from could.it which includes this MOVE improvement http://issues.apache.org/jira/browse/HADOOP-505 that makes a real move and not a copy+delete
-
- client.log
- 21/Nov/06 8:39 PM
- 15 kB
- Carlos Sanchez
-
- server.log
- 21/Nov/06 8:39 PM
- 49 kB
- Carlos Sanchez
-
Hide
- webdav-0.5-dev.jar
- 21/Nov/06 8:44 PM
- 105 kB
- Carlos Sanchez
-
- META-INF/MANIFEST.MF 0.1 kB
- it/could/util/StreamTools.class 1 kB
- it/could/util/StringTools.class 4 kB
- it/could/util/encoding/Encodable.class 0.3 kB
- it/could/.../encoding/EncodingAware.class 0.4 kB
- it/could/.../encoding/EncodingTools.class 7 kB
- it/could/util/encoding/Encodings.class 1 kB
- it/could/.../encoding/URICharacters.class 2 kB
- it/could/util/http/HttpClient$1.class 1 kB
- it/could/.../http/HttpClient$Input.class 3 kB
- it/could/.../http/HttpClient$Output.class 4 kB
- it/.../HttpClient$PlainSocketFactory.class 1.0 kB
- it/could/.../HttpClient$RequestHeader.class 1 kB
- it/could/.../HttpClient$ResponseHeader.class 1 kB
- it/could/.../HttpClient$SocketFactory.class 0.3 kB
- it/could/.../http/HttpClient$Status.class 2 kB
- it/could/util/http/HttpClient.class 15 kB
- it/could/util/http/WebDavClient$1.class 1 kB
- it/could/util/http/WebDavClient$2.class 1 kB
- it/could/.../http/WebDavClient$Handler.class 6 kB
- it/could/.../WebDavClient$Resource.class 3 kB
- it/could/util/http/WebDavClient.class 15 kB
- it/could/util/location/Authority.class 6 kB
- it/could/util/location/Location.class 10 kB
- it/could/util/location/Parameter.class 3 kB
- it/could/util/location/Parameters.class 5 kB
- it/could/util/location/Path.class 8 kB
- it/could/util/location/PathElement.class 4 kB
- it/could/webdav/DAVException.class 3 kB
- it/could/webdav/DAVInputStream.class 3 kB
Issue Links
Activity
What's happening (Technical)
Request
MOVE /repository/corporate/cas HTTP/1.1
Content-Language: en-us
Accept-Language: en-us
Overwrite: F
Destination: http://192.168.1.104:9091/repository/snapshots/cas
Translate: f
User-Agent: Microsoft Data Access Internet Publishing Provider DAV
Host: 192.168.1.104:9091
Content-Length: 0
Connection: Keep-Alive
Cookie: JSESSIONID=1ia9oq074832f
Authorization: Basic YWRtaW46Ym9iMQ==
Response
HTTP/1.1 500 URI_scheme_is_not_file Content-Type: text/html; charset=ISO-8859-1 Content-Length: 3887 Server: Archiva : CouldIT-WebDAV/0.4 DAV: 1 MS-Author-Via: DAV Connection: keep-alive <h2>HTTP ERROR: 500</h2><pre>URI scheme is not "file"</pre> <p>RequestURI=/repository/corporate/cas</p><h3>Caused by:</h3><pre>java.lang.IllegalArgumentException: URI scheme is not "file" .at java.io.File.<init>(File.java:324) .at it.could.webdav.DAVRepository.getResource(DAVRepository.java:125) .at it.could.webdav.methods.COPY.process(COPY.java:52) .at it.could.webdav.methods.MOVE.process(MOVE.java:47) .at it.could.webdav.DAVProcessor.process(DAVProcessor.java:79) .at org.apache.maven.archiva.web.servlet.repository.RepositoryAccess.servletRequest(RepositoryAccess.java:227) .at org.apache.maven.archiva.web.servlet.PlexusComponentServlet.service(PlexusComponentServlet.java:129) .at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445) .at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1049) .at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:189) .at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1040) .at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
The webdav servlet is being passed 2 pieces of information.
- Source File to Move From: /repository/corporate/cas
- Destination to Move To: http://192.168.1.104:9091/repository/snapshots/cas
The webdav servlet cannot handle moving a resource out to another URL.
It expects local to repository moves only.
That's why we get the URI scheme is not "file" error message.
Potential Solutions:
- Deny COPY and MOVE requests from working.
- Adjust the destination header if it is determined to belong to another archiva repository before it.could.webdav handles the request.
- Create support for remove URL webdav move in it.could.webdav sourcebase using slide-webdav-client libraries.
- Dump it.could.webdav in favor of slide-webdav-servlet
None of these solutions seem like a good idea to me.
Any opinions?
what's the downside of using slide?
of them all, (2) seems like the "best" solution, assuming that is fairly straightfoward?
The biggest concern in implementing solution #2 is the security aspect.
This would mean the webdav impl is now aware of redback and archiva itself. (unless we do some smoke and mirrors on the incoming HttpServletRequest before the webdav impl gets it)
Supporting the WebDav MOVE operation is going to be tricky.
This functionality should work once the migration to Jackrabbits webdav API is complete.
The code I tested from could.it is http://could.it/repo/webdav/head rev# 262