jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1829963 - in /jackrabbit/branches/2.12: ./ jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/URIResolverImpl.java
Date Tue, 24 Apr 2018 07:25:15 GMT
Author: reschke
Date: Tue Apr 24 07:25:15 2018
New Revision: 1829963

URL: http://svn.apache.org/viewvc?rev=1829963&view=rev
Log:
JCR-4185: spi2dav URIResolverImpl should check status code before attempting to parse multistatus
(ported to 2.12)

Modified:
    jackrabbit/branches/2.12/   (props changed)
    jackrabbit/branches/2.12/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/URIResolverImpl.java

Propchange: jackrabbit/branches/2.12/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Apr 24 07:25:15 2018
@@ -1,4 +1,4 @@
 /jackrabbit/branches/2.14:1813154,1813337
 /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,1772343,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,1776907,1776911-1776912,1776914,1776918,1779166,1779460,1779632,1780208,1786325,1787043,1787381,1792100,1792105,1792113,1792193,1793315,1793323,1793327,1793332,1796980,1797209,1797917,1798586,1799429,1802977,1807234,1807244,1809149,1809329,1810108,1811667,1814831,1817097,1820119,1821597,1826230,1826647,1826940,1826964
+/jackrabbit/trunk:1732436,1751279,1752165,1753226,1758600,1759607,1759782,1759865,1761679,1761909,1762422,1763558,1766398,1768684,1771078,1771741,1771939,1771999,1772049,1772299,1772343,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,1776907,1776911-1776912,1776914,1776918,1779166,1779460,1779632,1780208,1786325,1787043,1787381,1792100,1792105,1792113,1792193,1793315,1793323,1793327,1793332,1796980,1797209,1797917,1798586,1799429,1802977,1807234,1807244,1808752,1809149,1809329,1810108,1811667,1814831,1817097,1820119,1821597,1826230,1826647,1826940,1826964

Modified: jackrabbit/branches/2.12/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/URIResolverImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.12/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/URIResolverImpl.java?rev=1829963&r1=1829962&r2=1829963&view=diff
==============================================================================
--- jackrabbit/branches/2.12/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/URIResolverImpl.java
(original)
+++ jackrabbit/branches/2.12/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/URIResolverImpl.java
Tue Apr 24 07:25:15 2018
@@ -280,13 +280,15 @@ class URIResolverImpl implements URIReso
         try {
             method = new PropFindMethod(uri, nameSet, DavConstants.DEPTH_0);
 
-            service.getClient(sessionInfo).executeMethod(method);
+            int status = service.getClient(sessionInfo).executeMethod(method);
+            if (status != DavServletResponse.SC_MULTI_STATUS) {
+                throw new ItemNotFoundException("Unable to retrieve the node with id " +
uri + ", response status was: " + status);
+            }
             MultiStatusResponse[] responses = method.getResponseBodyAsMultiStatus().getResponses();
             if (responses.length != 1) {
                 throw new ItemNotFoundException("Unable to retrieve the node with id " +
uri);
             }
             return buildNodeId(parentId, uri, responses[0], sessionInfo.getWorkspaceName(),
service.getNamePathResolver(sessionInfo));
-
         } catch (IOException e) {
             throw new RepositoryException(e);
         } catch (DavException e) {



Mime
View raw message