jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1801826 - in /jackrabbit/branches/2.12: ./ jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/ jackrabbit-jcr2spi/ jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/ jackrabbit-webdav/src/main/java...
Date Thu, 13 Jul 2017 10:43:41 GMT
Author: reschke
Date: Thu Jul 13 10:43:41 2017
New Revision: 1801826

URL: http://svn.apache.org/viewvc?rev=1801826&view=rev
Log:
JCR-4146: json extension is removed by AbstractWebdavServlet on COPY request (ported to 2.12)

Added:
    jackrabbit/branches/2.12/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/CopyMoveToJsonTest.java
      - copied unchanged from r1799429, jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/CopyMoveToJsonTest.java
Modified:
    jackrabbit/branches/2.12/   (props changed)
    jackrabbit/branches/2.12/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java
    jackrabbit/branches/2.12/jackrabbit-jcr2spi/pom.xml
    jackrabbit/branches/2.12/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/TestAll.java
    jackrabbit/branches/2.12/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java
    jackrabbit/branches/2.12/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
    jackrabbit/branches/2.12/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/package-info.java

Propchange: jackrabbit/branches/2.12/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 13 10:43:41 2017
@@ -1,3 +1,3 @@
 /jackrabbit/branches/JCR-2272:1173165-1176545
 /jackrabbit/sandbox/JCR-2415-lucene-3.0:1060860-1064038
-/jackrabbit/trunk:1732436,1751279,1752165,1753226,1758600,1759607,1759782,1759865,1761679,1761909,1762422,1763558,1766398,1768684,1771078,1771741,1771939,1771999,1772049,1772299,1772444,1772457,1772530,1772544,1772597,1772822,1773579,1773591,1773745,1774021,1774443,1775123,1775132,1775315,1775384,1775414,1775419,1775437,1775444,1775463,1775472-1775473,1775481,1775485,1775496,1775509,1775514,1775613,1775617,1775621,1775624,1775629,1775631-1775632,1775634-1775635,1775637,1775657,1776410,1776414,1776416-1776417,1776421,1779166,1779460,1780208,1786325,1787043,1787381,1792193,1793315,1793323,1793327,1793332
+/jackrabbit/trunk:1732436,1751279,1752165,1753226,1758600,1759607,1759782,1759865,1761679,1761909,1762422,1763558,1766398,1768684,1771078,1771741,1771939,1771999,1772049,1772299,1772444,1772457,1772530,1772544,1772597,1772822,1773579,1773591,1773745,1774021,1774443,1775123,1775132,1775315,1775384,1775414,1775419,1775437,1775444,1775463,1775472-1775473,1775481,1775485,1775496,1775509,1775514,1775613,1775617,1775621,1775624,1775629,1775631-1775632,1775634-1775635,1775637,1775657,1776410,1776414,1776416-1776417,1776421,1779166,1779460,1780208,1786325,1787043,1787381,1792193,1793315,1793323,1793327,1793332,1799429

Modified: jackrabbit/branches/2.12/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.12/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java?rev=1801826&r1=1801825&r2=1801826&view=diff
==============================================================================
--- jackrabbit/branches/2.12/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java
(original)
+++ jackrabbit/branches/2.12/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/remoting/davex/JcrRemotingServlet.java
Thu Jul 13 10:43:41 2017
@@ -674,8 +674,13 @@ public abstract class JcrRemotingServlet
 
         @Override
         public DavResourceLocator createResourceLocator(String prefix, String href) {
+            return createResourceLocator(prefix, href, false);
+        }
+
+        @Override
+        public DavResourceLocator createResourceLocator(String prefix, String href, boolean
forDestination) {
             DavResourceLocator loc = super.createResourceLocator(prefix, href);
-            if (endsWithJson(href)) {
+            if (!forDestination && endsWithJson(href)) {
                 loc = new WrappingLocator(super.createResourceLocator(prefix, href));
             }
             return loc;

Modified: jackrabbit/branches/2.12/jackrabbit-jcr2spi/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.12/jackrabbit-jcr2spi/pom.xml?rev=1801826&r1=1801825&r2=1801826&view=diff
==============================================================================
--- jackrabbit/branches/2.12/jackrabbit-jcr2spi/pom.xml (original)
+++ jackrabbit/branches/2.12/jackrabbit-jcr2spi/pom.xml Thu Jul 13 10:43:41 2017
@@ -120,6 +120,10 @@
       <artifactId>commons-collections</artifactId>
     </dependency>
     <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency>
+    <dependency>
       <groupId>concurrent</groupId>
       <artifactId>concurrent</artifactId>
       <scope>test</scope>

Modified: jackrabbit/branches/2.12/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/TestAll.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.12/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/TestAll.java?rev=1801826&r1=1801825&r2=1801826&view=diff
==============================================================================
--- jackrabbit/branches/2.12/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/TestAll.java
(original)
+++ jackrabbit/branches/2.12/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/TestAll.java
Thu Jul 13 10:43:41 2017
@@ -107,6 +107,9 @@ public class TestAll extends TestCase {
         // workspace mgt
         suite.addTestSuite(WorkspaceTest.class);
 
+        // json (because of remoting servlet)
+        suite.addTestSuite(CopyMoveToJsonTest.class);
+
         return suite;
     }
 }
\ No newline at end of file

Modified: jackrabbit/branches/2.12/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.12/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java?rev=1801826&r1=1801825&r2=1801826&view=diff
==============================================================================
--- jackrabbit/branches/2.12/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java
(original)
+++ jackrabbit/branches/2.12/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/AbstractLocatorFactory.java
Thu Jul 13 10:43:41 2017
@@ -136,6 +136,15 @@ public abstract class AbstractLocatorFac
     }
 
     /**
+     * Like {@link #createResourceLocator(String, String)}, but by setting
+     * {@code forDestination} to {@code true} any special processing of URI
+     * suffixes can be disabled.
+     */
+    public DavResourceLocator createResourceLocator(String prefix, String href, boolean forDestination)
{
+        return createResourceLocator(prefix, href);
+    }
+
+   /**
      * Create a new <code>DavResourceLocator</code> from the specified prefix,
      * workspace path and resource path, without modifying the specified Strings.
      * Note, that it is expected that the resource path starts with the

Modified: jackrabbit/branches/2.12/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.12/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java?rev=1801826&r1=1801825&r2=1801826&view=diff
==============================================================================
--- jackrabbit/branches/2.12/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
(original)
+++ jackrabbit/branches/2.12/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
Thu Jul 13 10:43:41 2017
@@ -177,16 +177,10 @@ public class WebdavRequestImpl implement
      * @see DavServletRequest#getDestinationLocator
      */
     public DavResourceLocator getDestinationLocator() throws DavException {
-        return getHrefLocator(httpRequest.getHeader(HEADER_DESTINATION));
+        return getHrefLocator(httpRequest.getHeader(HEADER_DESTINATION), true);
     }
 
-    /**
-     * Parse a href and return the path of the resource.
-     *
-     * @return path of the resource identified by the href.
-     * @see org.apache.jackrabbit.webdav.bind.BindServletRequest#getHrefLocator
-     */
-    public DavResourceLocator getHrefLocator(String href) throws DavException {
+    private DavResourceLocator getHrefLocator(String href, boolean forDestination) throws
DavException {
         String ref = href;
         if (ref != null) {
             //href should be a Simple-ref production as defined in RFC4918, so it is either
an absolute URI
@@ -220,7 +214,22 @@ public class WebdavRequestImpl implement
                 throw new DavException(DavServletResponse.SC_FORBIDDEN);
             }
         }
-        return factory.createResourceLocator(hrefPrefix, ref);
+        if (factory instanceof AbstractLocatorFactory) {
+            return ((AbstractLocatorFactory)factory).createResourceLocator(hrefPrefix, ref,
forDestination);
+        }
+        else {
+            return factory.createResourceLocator(hrefPrefix, ref);
+        }
+    }
+
+    /**
+     * Parse a href and return the path of the resource.
+     *
+     * @return path of the resource identified by the href.
+     * @see org.apache.jackrabbit.webdav.bind.BindServletRequest#getHrefLocator
+     */
+    public DavResourceLocator getHrefLocator(String href) throws DavException {
+        return getHrefLocator(href, false);
     }
 
     /**

Modified: jackrabbit/branches/2.12/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/package-info.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.12/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/package-info.java?rev=1801826&r1=1801825&r2=1801826&view=diff
==============================================================================
--- jackrabbit/branches/2.12/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/package-info.java
(original)
+++ jackrabbit/branches/2.12/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/package-info.java
Thu Jul 13 10:43:41 2017
@@ -14,5 +14,5 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-@aQute.bnd.annotation.Version("1.0.1")
+@aQute.bnd.annotation.Version("1.1.0")
 package org.apache.jackrabbit.webdav;



Mime
View raw message