Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Servlets Post 2.0.2
-
None
-
J2SE 1.6.0_14-b08, Debian Linux
Description
Using the SlingPostServlet to move a node which exists at the top-level of the repository (directly under '/') fails:
curl -X POST http://localhost:8080/a2 -u admin:admin
curl -F ":operation=move" http://localhost:8080/a2 -F ":dest=a4" -u admin:admin
13.08.2009 13:38:19.413 ERROR [127.0.0.1 [1250167068213] POST /d11250167067 HTTP/1.1] org.apache.sling.servlets.post.impl.operations.MoveOperation Exception during response processing. javax.jcr.RepositoryException: invalid path://d21250167067: '//d21250167067' is not a valid path. double slash '//' not allowed.: '//d21250167067' is not a valid path. double slash '//' not allowed.
at org.apache.jackrabbit.core.SessionImpl.itemExists(SessionImpl.java:831)
at org.apache.sling.servlets.post.impl.operations.MoveOperation.execute(MoveOperation.java:51)
at org.apache.sling.servlets.post.impl.operations.AbstractCopyMoveOperation.doRun(AbstractCopyMoveOperation.java:110)
at org.apache.sling.servlets.post.AbstractSlingPostOperation.run(AbstractSlingPostOperation.java:87)
at org.apache.sling.servlets.post.impl.SlingPostServlet.doPost(SlingPostServlet.java:172)
at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:143)
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:338)
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:369)
at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:520)
at org.apache.sling.engine.impl.SlingMainServlet.processRequest(SlingMainServlet.java:409)
at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:48)
The attached patch fixes the issue.