Hi,
I've solved the bug that prevents MoveMethod to work when
WebdavServlet's scope parameter is used.
You will find enclosed the patch.
It would be great if someone could commit it.
It has been tested with and without scope parameter and should work well
too with deployments as root context.
The problem is with the following search related method call :
SearchQuery searchQuery =
searchHelper.createSearchQuery(grammarNamespace,
basicSearch,
new SlideTokenWrapper(slideToken, false),
Integer.MAX_VALUE,
req.getRequestURI());
which takes as last argument complete request URI.
When using scope parameter, real complete request URI is given by adding
request context, scope parameter and request path and not only request
context and path.
That said, I would have some questions :
1�) I realized that all search stuff seems to work with complete URI and
not with slide namespace uri.
Is there a reason for that ?
If not, I think it is dangerous since it duplicates
complete uri -> slide uri translations so it can duplicate bugs too.
Would not it be simplier just to pass it resourceUri that already
contains complete uri -> slide uri translation and characters
escaping ?
2�) A clear and stable interface for store optimized search has not been
proposed yet.
Until it is, I think we should avoid using search when it is not
absolutly necessary.
I would be pleased to understand why search is used during MOVE and
PUT requests.
Now, I will try to find why COPY is not working anymore
Best Regards
Jp
--- MoveMethod.java.origin Thu Oct 3 14:04:57 2002
+++ MoveMethod.java Thu Oct 3 14:08:00 2002
@@ -439,11 +439,13 @@
Element basicSearch = getWorkingResourceSearchElement(sourceUri);
String grammarNamespace = basicSearch.getNamespaceURI();
Search searchHelper = token.getSearchHelper();
+ StringBuffer requestURIWithScope = new StringBuffer(req.getContextPath());
+ requestURIWithScope.append(sourceUri);
SearchQuery searchQuery = searchHelper.createSearchQuery(grammarNamespace,
basicSearch,
new
SlideTokenWrapper(slideToken, false),
Integer.MAX_VALUE,
-
req.getRequestURI());
+
+requestURIWithScope.toString());
SearchQueryResult queryResult = searchHelper.search(new
SlideTokenWrapper(slideToken, false), searchQuery);
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>