jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1463562 - /jackrabbit/oak/trunk/oak-http/src/main/java/org/apache/jackrabbit/oak/http/OakServlet.java
Date Tue, 02 Apr 2013 14:26:27 GMT
Author: mduerig
Date: Tue Apr  2 14:26:27 2013
New Revision: 1463562

URL: http://svn.apache.org/r1463562
Log:
OAK-669: Exception while creating a new node using the HTTP API

Modified:
    jackrabbit/oak/trunk/oak-http/src/main/java/org/apache/jackrabbit/oak/http/OakServlet.java

Modified: jackrabbit/oak/trunk/oak-http/src/main/java/org/apache/jackrabbit/oak/http/OakServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-http/src/main/java/org/apache/jackrabbit/oak/http/OakServlet.java?rev=1463562&r1=1463561&r2=1463562&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-http/src/main/java/org/apache/jackrabbit/oak/http/OakServlet.java
(original)
+++ jackrabbit/oak/trunk/oak-http/src/main/java/org/apache/jackrabbit/oak/http/OakServlet.java
Tue Apr  2 14:26:27 2013
@@ -80,8 +80,11 @@ public class OakServlet extends HttpServ
                 while (tree == null) {
                     int slash = head.lastIndexOf('/');
                     tail = head.substring(slash) + tail;
-                    head = head.substring(0, slash - 1);
-                    tree = root.getTree(tail);
+                    head = head.substring(0, slash);
+                    if (head.isEmpty()){
+                    	head="/";
+                    }
+                    tree = root.getTree(head);
                 }
                 request.setAttribute("tree", tree);
                 request.setAttribute("path", tail);



Mime
View raw message