jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1866114 - in /jackrabbit/branches/2.16: ./ jackrabbit-jcr2dav/src/test/java/org/apache/jackrabbit/jcr2dav/RepositoryStubImpl.java
Date Fri, 30 Aug 2019 04:49:21 GMT
Author: reschke
Date: Fri Aug 30 04:49:21 2019
New Revision: 1866114

URL: http://svn.apache.org/viewvc?rev=1866114&view=rev
Log:
JCR-4460: allow to run remoted conformance tests with a custom servlet context path (merged
r1863222 and r1863384 into 2.16)

Modified:
    jackrabbit/branches/2.16/   (props changed)
    jackrabbit/branches/2.16/jackrabbit-jcr2dav/src/test/java/org/apache/jackrabbit/jcr2dav/RepositoryStubImpl.java

Propchange: jackrabbit/branches/2.16/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 30 04:49:21 2019
@@ -1,3 +1,3 @@
 /jackrabbit/branches/JCR-2272:1173165-1176545
 /jackrabbit/sandbox/JCR-2415-lucene-3.0:1060860-1064038
-/jackrabbit/trunk:1816227,1817094,1817097-1817098,1817100,1817113,1817201,1817213,1817341,1817373,1817377,1818586,1819269,1819271,1819839,1819849,1820119,1820133,1820294,1820573,1820675,1820753,1821247,1821475,1821597,1821705,1821880,1822643,1822863,1822947,1822950,1824756,1824763-1824764,1824771,1824876,1826154,1826178,1826230,1826647,1826940,1826964,1828213,1830107,1830201,1830540,1830753,1830814,1830878,1830951,1831182,1831854,1831860,1832058,1832090,1832177,1833374,1833835,1833891,1834008,1834308,1834315,1834401,1834418,1834424,1834673,1834922,1835445,1835448,1835459,1836341,1836349,1836620,1836722,1836729,1836731,1836733,1836773,1836776,1836778,1836794,1836800,1839647,1839910,1839924,1839931,1839937,1839945,1839964,1839966,1840007,1840027,1841459,1841858,1841865,1841916-1841917,1841924,1843392,1843995,1844000,1844014,1844030,1844036,1844067,1844252,1846665,1846896,1847167,1850224,1851360,1851369,1851372,1851380,1851384,1851904,1851946,1851953,1851961,1852417,1853927,1854018,185
 6855,1856969,1857631,1857721,1859534,1859563,1859633,1860118,1860123,1860645,1861773,1861777-1861778,1861781,1861786,1862283,1862783,1862805,1863196
+/jackrabbit/trunk:1816227,1817094,1817097-1817098,1817100,1817113,1817201,1817213,1817341,1817373,1817377,1818586,1819269,1819271,1819839,1819849,1820119,1820133,1820294,1820573,1820675,1820753,1821247,1821475,1821597,1821705,1821880,1822643,1822863,1822947,1822950,1824756,1824763-1824764,1824771,1824876,1826154,1826178,1826230,1826647,1826940,1826964,1828213,1830107,1830201,1830540,1830753,1830814,1830878,1830951,1831182,1831854,1831860,1832058,1832090,1832177,1833374,1833835,1833891,1834008,1834308,1834315,1834401,1834418,1834424,1834673,1834922,1835445,1835448,1835459,1836341,1836349,1836620,1836722,1836729,1836731,1836733,1836773,1836776,1836778,1836794,1836800,1839647,1839910,1839924,1839931,1839937,1839945,1839964,1839966,1840007,1840027,1841459,1841858,1841865,1841916-1841917,1841924,1843392,1843995,1844000,1844014,1844030,1844036,1844067,1844252,1846665,1846896,1847167,1850224,1851360,1851369,1851372,1851380,1851384,1851904,1851946,1851953,1851961,1852417,1853927,1854018,185
 6855,1856969,1857631,1857721,1859534,1859563,1859633,1860118,1860123,1860645,1861773,1861777-1861778,1861781,1861786,1862283,1862783,1862805,1863196,1863222,1863384

Modified: jackrabbit/branches/2.16/jackrabbit-jcr2dav/src/test/java/org/apache/jackrabbit/jcr2dav/RepositoryStubImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.16/jackrabbit-jcr2dav/src/test/java/org/apache/jackrabbit/jcr2dav/RepositoryStubImpl.java?rev=1866114&r1=1866113&r2=1866114&view=diff
==============================================================================
--- jackrabbit/branches/2.16/jackrabbit-jcr2dav/src/test/java/org/apache/jackrabbit/jcr2dav/RepositoryStubImpl.java
(original)
+++ jackrabbit/branches/2.16/jackrabbit-jcr2dav/src/test/java/org/apache/jackrabbit/jcr2dav/RepositoryStubImpl.java
Fri Aug 30 04:49:21 2019
@@ -54,6 +54,8 @@ public class RepositoryStubImpl extends
 
     private final String protectedRemoveImplClass;
 
+    private static final String WEBDAV_SERVLET_CONTEXT = System.getProperty("WebDAVServletContext",
"/");
+
     public RepositoryStubImpl(Properties env) {
         super(env);
         acProviderImplClass = env.getProperty(PROP_ACCESSCONTROL_PROVIDER_CLASS);
@@ -74,11 +76,15 @@ public class RepositoryStubImpl extends
                     return repository;
                 }
             });
-            holder.setInitParameter(JCRWebdavServerServlet.INIT_PARAM_RESOURCE_PATH_PREFIX,
"");
+            String pathPrefix = WEBDAV_SERVLET_CONTEXT;
+            if (pathPrefix.endsWith("/")) {
+                pathPrefix = pathPrefix.substring(0,  pathPrefix.length() - 1);
+            }
+            holder.setInitParameter(JCRWebdavServerServlet.INIT_PARAM_RESOURCE_PATH_PREFIX,
pathPrefix);
             holder.setInitParameter(JCRWebdavServerServlet.INIT_PARAM_MISSING_AUTH_MAPPING,
"");
             holder.setInitParameter(JcrRemotingServlet.INIT_PARAM_PROTECTED_HANDLERS_CONFIG,
protectedRemoveImplClass);
 
-            ServletContextHandler schandler = new ServletContextHandler(server, "/");
+            ServletContextHandler schandler = new ServletContextHandler(server, WEBDAV_SERVLET_CONTEXT);
             schandler.addServlet(holder, "/*");
         }
 
@@ -101,7 +107,7 @@ public class RepositoryStubImpl extends
             try {
                 Map<String, String> parameters = new HashMap<String, String>();
 
-                String uri = "http://localhost:" + connector.getLocalPort() + "/";
+                String uri = "http://localhost:" + connector.getLocalPort() + WEBDAV_SERVLET_CONTEXT;
 
                 String parmName = System.getProperty(this.getClass().getName() + ".REPURIPARM",
JcrUtils.REPOSITORY_URI);
                 parameters.put(parmName, uri);



Mime
View raw message